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

Unified Diff: components/sessions/session_service_commands.cc

Issue 818833004: Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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: components/sessions/session_service_commands.cc
diff --git a/components/sessions/session_service_commands.cc b/components/sessions/session_service_commands.cc
index bc005b96cc34faae657e5f72fa61110b8329143c..076ce74edc54de7520568a381dd8dd5633b2a67e 100644
--- a/components/sessions/session_service_commands.cc
+++ b/components/sessions/session_service_commands.cc
@@ -534,8 +534,8 @@ bool CreateTabsAndWindows(const ScopedVector<SessionCommand>& data,
SessionID::id_type command_tab_id;
std::string session_storage_persistent_id;
PickleIterator iter(*command_pickle.get());
- if (!command_pickle->ReadInt(&iter, &command_tab_id) ||
- !command_pickle->ReadString(&iter, &session_storage_persistent_id))
+ if (!iter.ReadInt(&command_tab_id) ||
+ !iter.ReadString(&session_storage_persistent_id))
return true;
// Associate the session storage back.
GetTab(command_tab_id, tabs)->session_storage_persistent_id =
@@ -775,8 +775,8 @@ bool ReplacePendingCommand(BaseSessionService* base_session_service,
PickleIterator iterator(*command_pickle);
SessionID::id_type command_tab_id;
int command_nav_index;
- if (!command_pickle->ReadInt(&iterator, &command_tab_id) ||
- !command_pickle->ReadInt(&iterator, &command_nav_index)) {
+ if (!iterator.ReadInt(&command_tab_id) ||
+ !iterator.ReadInt(&command_nav_index)) {
return false;
}
SessionID::id_type existing_tab_id;
@@ -787,8 +787,8 @@ bool ReplacePendingCommand(BaseSessionService* base_session_service,
// the pickle references deleted memory.
scoped_ptr<Pickle> existing_pickle(existing_command->PayloadAsPickle());
iterator = PickleIterator(*existing_pickle);
- if (!existing_pickle->ReadInt(&iterator, &existing_tab_id) ||
- !existing_pickle->ReadInt(&iterator, &existing_nav_index)) {
+ if (!iterator.ReadInt(&existing_tab_id) ||
+ !iterator.ReadInt(&existing_nav_index)) {
return false;
}
}
« no previous file with comments | « components/sessions/base_session_service_commands.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698