| 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 64c094c7e4ffe4a887f95006745bfa6a91b69162..7cdcb6e6b026a2a1ffb5c1fa5d71160d83a18559 100644
|
| --- a/chrome/browser/sessions/base_session_service.cc
|
| +++ b/chrome/browser/sessions/base_session_service.cc
|
| @@ -219,6 +219,18 @@ SessionCommand* BaseSessionService::CreateSetWindowAppNameCommand(
|
| return new SessionCommand(command_id, pickle);
|
| }
|
|
|
| +SessionCommand* BaseSessionService::CreateSetTabSessionSyncIdCommand(
|
| + SessionID::id_type command_id,
|
| + SessionID::id_type tab_id,
|
| + const int64& sync_id) {
|
| + // Use pickle to handle marshalling.
|
| + Pickle pickle;
|
| + pickle.WriteInt(tab_id);
|
| + pickle.WriteInt64(sync_id);
|
| +
|
| + return new SessionCommand(command_id, pickle);
|
| +}
|
| +
|
| bool BaseSessionService::RestoreUpdateTabNavigationCommand(
|
| const SessionCommand& command,
|
| sessions::SerializedNavigationEntry* navigation,
|
| @@ -271,6 +283,19 @@ bool BaseSessionService::RestoreSetWindowAppNameCommand(
|
| pickle->ReadString(&iterator, app_name);
|
| }
|
|
|
| +bool BaseSessionService::RestoreSetTabSessionSyncIdCommand(
|
| + const SessionCommand& command,
|
| + SessionID::id_type* tab_id,
|
| + int64* sync_id) {
|
| + scoped_ptr<Pickle> pickle(command.PayloadAsPickle());
|
| + if (!pickle.get())
|
| + return false;
|
| +
|
| + PickleIterator iterator(*pickle);
|
| + return pickle->ReadInt(&iterator, tab_id) &&
|
| + pickle->ReadInt64(&iterator, sync_id);
|
| +}
|
| +
|
| bool BaseSessionService::ShouldTrackEntry(const GURL& url) {
|
| return url.is_valid();
|
| }
|
|
|