Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: chrome/browser/sessions/base_session_service.cc

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile (racing with incoming CLs) Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sessions/base_session_service.cc
diff --git a/chrome/browser/sessions/base_session_service.cc b/chrome/browser/sessions/base_session_service.cc
index 9f4d05a1ce222c5d5358850c43f085edce77535f..6925d91d52645c80f497a46b0cb75242c47ac60f 100644
--- a/chrome/browser/sessions/base_session_service.cc
+++ b/chrome/browser/sessions/base_session_service.cc
@@ -273,7 +273,7 @@ bool BaseSessionService::RestoreUpdateTabNavigationCommand(
scoped_ptr<Pickle> pickle(command.PayloadAsPickle());
if (!pickle.get())
return false;
- void* iterator = NULL;
+ PickleIterator iterator(*pickle);
std::string url_spec;
if (!pickle->ReadInt(&iterator, tab_id) ||
!pickle->ReadInt(&iterator, &(navigation->index_)) ||
@@ -328,7 +328,7 @@ bool BaseSessionService::RestoreSetTabExtensionAppIDCommand(
if (!pickle.get())
return false;
- void* iterator = NULL;
+ PickleIterator iterator(*pickle);
return pickle->ReadInt(&iterator, tab_id) &&
pickle->ReadString(&iterator, extension_app_id);
}
@@ -341,7 +341,7 @@ bool BaseSessionService::RestoreSetWindowAppNameCommand(
if (!pickle.get())
return false;
- void* iterator = NULL;
+ PickleIterator iterator(*pickle);
return pickle->ReadInt(&iterator, window_id) &&
pickle->ReadString(&iterator, app_name);
}
« no previous file with comments | « chrome/browser/password_manager/native_backend_kwallet_x.cc ('k') | chrome/browser/sessions/compress_data_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698