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

Side by Side Diff: chrome/browser/sync/internal_api/sync_manager.cc

Issue 9729012: Reland 127510 - Enable tab sync on all platforms by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/internal_api/sync_manager.h" 5 #include "chrome/browser/sync/internal_api/sync_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 1177
1178 void SyncManager::SyncInternal::MaybeSetSyncTabsInNigoriNode( 1178 void SyncManager::SyncInternal::MaybeSetSyncTabsInNigoriNode(
1179 const ModelTypeSet enabled_types) { 1179 const ModelTypeSet enabled_types) {
1180 // The initialized_ check is to ensure that we don't CHECK in GetUserShare 1180 // The initialized_ check is to ensure that we don't CHECK in GetUserShare
1181 // when this is called on start-up. It's ok to ignore that case, since 1181 // when this is called on start-up. It's ok to ignore that case, since
1182 // presumably this would've run when the user originally enabled sessions. 1182 // presumably this would've run when the user originally enabled sessions.
1183 if (initialized_ && enabled_types.Has(syncable::SESSIONS)) { 1183 if (initialized_ && enabled_types.Has(syncable::SESSIONS)) {
1184 WriteTransaction trans(FROM_HERE, GetUserShare()); 1184 WriteTransaction trans(FROM_HERE, GetUserShare());
1185 WriteNode node(&trans); 1185 WriteNode node(&trans);
1186 if (!node.InitByTagLookup(kNigoriTag)) { 1186 if (!node.InitByTagLookup(kNigoriTag)) {
1187 NOTREACHED() << "Unable to set 'sync_tabs' bit because Nigori node not " 1187 LOG(WARNING) << "Unable to set 'sync_tabs' bit because Nigori node not "
1188 << "found."; 1188 << "found.";
1189 return; 1189 return;
1190 } 1190 }
1191 1191
1192 sync_pb::NigoriSpecifics specifics(node.GetNigoriSpecifics()); 1192 sync_pb::NigoriSpecifics specifics(node.GetNigoriSpecifics());
1193 specifics.set_sync_tabs(true); 1193 specifics.set_sync_tabs(true);
1194 node.SetNigoriSpecifics(specifics); 1194 node.SetNigoriSpecifics(specifics);
1195 } 1195 }
1196 } 1196 }
1197 1197
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 share->directory->GetDownloadProgress(i.Get(), &marker); 2485 share->directory->GetDownloadProgress(i.Get(), &marker);
2486 2486
2487 if (marker.token().empty()) 2487 if (marker.token().empty())
2488 result.Put(i.Get()); 2488 result.Put(i.Get());
2489 2489
2490 } 2490 }
2491 return result; 2491 return result;
2492 } 2492 }
2493 2493
2494 } // namespace sync_api 2494 } // namespace sync_api
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | chrome/browser/sync/profile_sync_components_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698