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

Side by Side Diff: chrome/browser/sync/profile_sync_service_harness.cc

Issue 12286007: Revert "Revert 182527" ([Sync] Make SESSIONS an implicit type) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/profile_sync_service_harness.h" 5 #include "chrome/browser/sync/profile_sync_service_harness.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <iterator> 8 #include <iterator>
9 #include <ostream> 9 #include <ostream>
10 #include <set> 10 #include <set>
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 } 955 }
956 956
957 syncer::ModelTypeSet synced_datatypes = service()->GetPreferredDataTypes(); 957 syncer::ModelTypeSet synced_datatypes = service()->GetPreferredDataTypes();
958 if (!synced_datatypes.Has(datatype)) { 958 if (!synced_datatypes.Has(datatype)) {
959 DVLOG(1) << "DisableSyncForDatatype(): Sync already disabled for datatype " 959 DVLOG(1) << "DisableSyncForDatatype(): Sync already disabled for datatype "
960 << syncer::ModelTypeToString(datatype) 960 << syncer::ModelTypeToString(datatype)
961 << " on " << profile_debug_name_ << "."; 961 << " on " << profile_debug_name_ << ".";
962 return true; 962 return true;
963 } 963 }
964 964
965 synced_datatypes.RetainAll(syncer::UserSelectableTypes());
965 synced_datatypes.Remove(datatype); 966 synced_datatypes.Remove(datatype);
966 service()->OnUserChoseDatatypes(false, synced_datatypes); 967 service()->OnUserChoseDatatypes(false, synced_datatypes);
967 if (AwaitFullSyncCompletion("Datatype reconfiguration.")) { 968 if (AwaitFullSyncCompletion("Datatype reconfiguration.")) {
968 DVLOG(1) << "DisableSyncForDatatype(): Disabled sync for datatype " 969 DVLOG(1) << "DisableSyncForDatatype(): Disabled sync for datatype "
969 << syncer::ModelTypeToString(datatype) 970 << syncer::ModelTypeToString(datatype)
970 << " on " << profile_debug_name_ << "."; 971 << " on " << profile_debug_name_ << ".";
971 return true; 972 return true;
972 } 973 }
973 974
974 DVLOG(0) << GetClientInfoString("DisableSyncForDatatype failed"); 975 DVLOG(0) << GetClientInfoString("DisableSyncForDatatype failed");
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 1140
1140 std::string ProfileSyncServiceHarness::GetServiceStatus() { 1141 std::string ProfileSyncServiceHarness::GetServiceStatus() {
1141 scoped_ptr<DictionaryValue> value( 1142 scoped_ptr<DictionaryValue> value(
1142 sync_ui_util::ConstructAboutInformation(service_)); 1143 sync_ui_util::ConstructAboutInformation(service_));
1143 std::string service_status; 1144 std::string service_status;
1144 base::JSONWriter::WriteWithOptions(value.get(), 1145 base::JSONWriter::WriteWithOptions(value.get(),
1145 base::JSONWriter::OPTIONS_PRETTY_PRINT, 1146 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1146 &service_status); 1147 &service_status);
1147 return service_status; 1148 return service_status;
1148 } 1149 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698