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

Unified Diff: components/sessions/session_service_commands.cc

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « components/sessions/session_command.cc ('k') | components/visitedlink/test/visitedlink_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sessions/session_service_commands.cc
diff --git a/components/sessions/session_service_commands.cc b/components/sessions/session_service_commands.cc
index a7f653d5aa82cf25fedbb9bb92c0249773021f23..60be71cebb405df55946e25ea7856f2508e6d4b9 100644
--- a/components/sessions/session_service_commands.cc
+++ b/components/sessions/session_service_commands.cc
@@ -541,10 +541,10 @@ bool CreateTabsAndWindows(const ScopedVector<SessionCommand>& data,
}
case kCommandSessionStorageAssociated: {
- scoped_ptr<Pickle> command_pickle(command->PayloadAsPickle());
+ scoped_ptr<base::Pickle> command_pickle(command->PayloadAsPickle());
SessionID::id_type command_tab_id;
std::string session_storage_persistent_id;
- PickleIterator iter(*command_pickle.get());
+ base::PickleIterator iter(*command_pickle.get());
if (!iter.ReadInt(&command_tab_id) ||
!iter.ReadString(&session_storage_persistent_id))
return true;
@@ -705,7 +705,7 @@ scoped_ptr<SessionCommand> CreatePinnedStateCommand(
scoped_ptr<SessionCommand> CreateSessionStorageAssociatedCommand(
const SessionID& tab_id,
const std::string& session_storage_persistent_id) {
- Pickle pickle;
+ base::Pickle pickle;
pickle.WriteInt(tab_id.id());
pickle.WriteString(session_storage_persistent_id);
return scoped_ptr<SessionCommand>(
@@ -806,8 +806,8 @@ bool ReplacePendingCommand(BaseSessionService* base_session_service,
SessionCommand* existing_command = *i;
if ((*command)->id() == kCommandUpdateTabNavigation &&
existing_command->id() == kCommandUpdateTabNavigation) {
- scoped_ptr<Pickle> command_pickle((*command)->PayloadAsPickle());
- PickleIterator iterator(*command_pickle);
+ scoped_ptr<base::Pickle> command_pickle((*command)->PayloadAsPickle());
+ base::PickleIterator iterator(*command_pickle);
SessionID::id_type command_tab_id;
int command_nav_index;
if (!iterator.ReadInt(&command_tab_id) ||
@@ -820,8 +820,9 @@ bool ReplacePendingCommand(BaseSessionService* base_session_service,
// Creating a pickle like this means the Pickle references the data from
// the command. Make sure we delete the pickle before the command, else
// the pickle references deleted memory.
- scoped_ptr<Pickle> existing_pickle(existing_command->PayloadAsPickle());
- iterator = PickleIterator(*existing_pickle);
+ scoped_ptr<base::Pickle> existing_pickle(
+ existing_command->PayloadAsPickle());
+ iterator = base::PickleIterator(*existing_pickle);
if (!iterator.ReadInt(&existing_tab_id) ||
!iterator.ReadInt(&existing_nav_index)) {
return false;
« no previous file with comments | « components/sessions/session_command.cc ('k') | components/visitedlink/test/visitedlink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698