summaryrefslogtreecommitdiffstats
path: root/components/sessions
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2014-12-28 15:31:48 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-28 23:32:58 +0000
commit48fc13b16667c53399774daeccdb1ce5a625578f (patch)
treec8bcbfa3152d2d1e38e2fc0633ae4763b73eaa33 /components/sessions
parentafa7602b2e8b0f3640ab681b8132a970bd133933 (diff)
downloadchromium_src-48fc13b16667c53399774daeccdb1ce5a625578f.zip
chromium_src-48fc13b16667c53399774daeccdb1ce5a625578f.tar.gz
chromium_src-48fc13b16667c53399774daeccdb1ce5a625578f.tar.bz2
Remove deprecated methods from Pickle.
BUG=444578 TEST=none R=nasko@chromium.org TBR=ben@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/b740bfe23ae7ad244356a4a7538b95ae560251db Review URL: https://codereview.chromium.org/818833004 Cr-Commit-Position: refs/heads/master@{#309691}
Diffstat (limited to 'components/sessions')
-rw-r--r--components/sessions/base_session_service_commands.cc12
-rw-r--r--components/sessions/session_service_commands.cc12
2 files changed, 10 insertions, 14 deletions
diff --git a/components/sessions/base_session_service_commands.cc b/components/sessions/base_session_service_commands.cc
index c0ae0a3..09eab43 100644
--- a/components/sessions/base_session_service_commands.cc
+++ b/components/sessions/base_session_service_commands.cc
@@ -109,8 +109,7 @@ bool RestoreUpdateTabNavigationCommand(
if (!pickle.get())
return false;
PickleIterator iterator(*pickle);
- return pickle->ReadInt(&iterator, tab_id) &&
- navigation->ReadFromPickle(&iterator);
+ return iterator.ReadInt(tab_id) && navigation->ReadFromPickle(&iterator);
}
bool RestoreSetTabExtensionAppIDCommand(const SessionCommand& command,
@@ -121,8 +120,7 @@ bool RestoreSetTabExtensionAppIDCommand(const SessionCommand& command,
return false;
PickleIterator iterator(*pickle);
- return pickle->ReadInt(&iterator, tab_id) &&
- pickle->ReadString(&iterator, extension_app_id);
+ return iterator.ReadInt(tab_id) && iterator.ReadString(extension_app_id);
}
bool RestoreSetTabUserAgentOverrideCommand(const SessionCommand& command,
@@ -133,8 +131,7 @@ bool RestoreSetTabUserAgentOverrideCommand(const SessionCommand& command,
return false;
PickleIterator iterator(*pickle);
- return pickle->ReadInt(&iterator, tab_id) &&
- pickle->ReadString(&iterator, user_agent_override);
+ return iterator.ReadInt(tab_id) && iterator.ReadString(user_agent_override);
}
bool RestoreSetWindowAppNameCommand(const SessionCommand& command,
@@ -145,8 +142,7 @@ bool RestoreSetWindowAppNameCommand(const SessionCommand& command,
return false;
PickleIterator iterator(*pickle);
- return pickle->ReadInt(&iterator, window_id) &&
- pickle->ReadString(&iterator, app_name);
+ return iterator.ReadInt(window_id) && iterator.ReadString(app_name);
}
} // namespace sessions
diff --git a/components/sessions/session_service_commands.cc b/components/sessions/session_service_commands.cc
index 00be34b..3b5f8a1 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;
}
}