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

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

Issue 7775008: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review #6 Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 PrefService::UNSYNCABLE_PREF); 308 PrefService::UNSYNCABLE_PREF);
309 pref_service->RegisterBooleanPref(prefs::kSyncAutofill, 309 pref_service->RegisterBooleanPref(prefs::kSyncAutofill,
310 enable_by_default, 310 enable_by_default,
311 PrefService::UNSYNCABLE_PREF); 311 PrefService::UNSYNCABLE_PREF);
312 pref_service->RegisterBooleanPref(prefs::kSyncThemes, 312 pref_service->RegisterBooleanPref(prefs::kSyncThemes,
313 enable_by_default, 313 enable_by_default,
314 PrefService::UNSYNCABLE_PREF); 314 PrefService::UNSYNCABLE_PREF);
315 pref_service->RegisterBooleanPref(prefs::kSyncTypedUrls, 315 pref_service->RegisterBooleanPref(prefs::kSyncTypedUrls,
316 enable_by_default, 316 enable_by_default,
317 PrefService::UNSYNCABLE_PREF); 317 PrefService::UNSYNCABLE_PREF);
318 pref_service->RegisterBooleanPref(prefs::kSyncExtensionSettings,
319 enable_by_default,
320 PrefService::UNSYNCABLE_PREF);
318 pref_service->RegisterBooleanPref(prefs::kSyncExtensions, 321 pref_service->RegisterBooleanPref(prefs::kSyncExtensions,
319 enable_by_default, 322 enable_by_default,
320 PrefService::UNSYNCABLE_PREF); 323 PrefService::UNSYNCABLE_PREF);
321 pref_service->RegisterBooleanPref(prefs::kSyncApps, 324 pref_service->RegisterBooleanPref(prefs::kSyncApps,
322 enable_by_default, 325 enable_by_default,
323 PrefService::UNSYNCABLE_PREF); 326 PrefService::UNSYNCABLE_PREF);
324 pref_service->RegisterBooleanPref(prefs::kSyncSearchEngines, 327 pref_service->RegisterBooleanPref(prefs::kSyncSearchEngines,
325 enable_by_default, 328 enable_by_default,
326 PrefService::UNSYNCABLE_PREF); 329 PrefService::UNSYNCABLE_PREF);
327 pref_service->RegisterBooleanPref(prefs::kSyncSessions, 330 pref_service->RegisterBooleanPref(prefs::kSyncSessions,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 case syncable::PREFERENCES: 552 case syncable::PREFERENCES:
550 return prefs::kSyncPreferences; 553 return prefs::kSyncPreferences;
551 case syncable::AUTOFILL: 554 case syncable::AUTOFILL:
552 return prefs::kSyncAutofill; 555 return prefs::kSyncAutofill;
553 case syncable::AUTOFILL_PROFILE: 556 case syncable::AUTOFILL_PROFILE:
554 return prefs::kSyncAutofillProfile; 557 return prefs::kSyncAutofillProfile;
555 case syncable::THEMES: 558 case syncable::THEMES:
556 return prefs::kSyncThemes; 559 return prefs::kSyncThemes;
557 case syncable::TYPED_URLS: 560 case syncable::TYPED_URLS:
558 return prefs::kSyncTypedUrls; 561 return prefs::kSyncTypedUrls;
562 case syncable::EXTENSION_SETTINGS:
563 return prefs::kSyncExtensionSettings;
559 case syncable::EXTENSIONS: 564 case syncable::EXTENSIONS:
560 return prefs::kSyncExtensions; 565 return prefs::kSyncExtensions;
561 case syncable::APPS: 566 case syncable::APPS:
562 return prefs::kSyncApps; 567 return prefs::kSyncApps;
563 case syncable::SEARCH_ENGINES: 568 case syncable::SEARCH_ENGINES:
564 return prefs::kSyncSearchEngines; 569 return prefs::kSyncSearchEngines;
565 case syncable::SESSIONS: 570 case syncable::SESSIONS:
566 return prefs::kSyncSessions; 571 return prefs::kSyncSessions;
567 default: 572 default:
568 break; 573 break;
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 syncable::ModelTypeBitSetFromValue( 1618 syncable::ModelTypeBitSetFromValue(
1614 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); 1619 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes));
1615 syncable::ModelTypeSet registered; 1620 syncable::ModelTypeSet registered;
1616 GetRegisteredDataTypes(&registered); 1621 GetRegisteredDataTypes(&registered);
1617 syncable::ModelTypeBitSet registered_bit_set = 1622 syncable::ModelTypeBitSet registered_bit_set =
1618 syncable::ModelTypeBitSetFromSet(registered); 1623 syncable::ModelTypeBitSetFromSet(registered);
1619 unacknowledged = registered_bit_set & ~acknowledged; 1624 unacknowledged = registered_bit_set & ~acknowledged;
1620 } 1625 }
1621 return unacknowledged; 1626 return unacknowledged;
1622 } 1627 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698