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

Side by Side Diff: chrome/browser/extensions/extension_prefs.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + comments Created 9 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 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/extensions/extension_prefs.h" 5 #include "chrome/browser/extensions/extension_prefs.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_pref_store.h" 10 #include "chrome/browser/extensions/extension_pref_store.h"
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 bool ExtensionPrefs::HasIncognitoPrefValue(const std::string& pref_key) { 1537 bool ExtensionPrefs::HasIncognitoPrefValue(const std::string& pref_key) {
1538 bool has_incognito_pref_value = false; 1538 bool has_incognito_pref_value = false;
1539 extension_pref_value_map_->GetEffectivePrefValue(pref_key, 1539 extension_pref_value_map_->GetEffectivePrefValue(pref_key,
1540 true, 1540 true,
1541 &has_incognito_pref_value); 1541 &has_incognito_pref_value);
1542 return has_incognito_pref_value; 1542 return has_incognito_pref_value;
1543 } 1543 }
1544 1544
1545 // static 1545 // static
1546 void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) { 1546 void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) {
1547 prefs->RegisterDictionaryPref(kExtensionsPref); 1547 prefs->RegisterDictionaryPref(kExtensionsPref, false /* don't sync pref */);
1548 prefs->RegisterListPref(kExtensionToolbar); 1548 prefs->RegisterListPref(kExtensionToolbar, false /* don't sync pref */);
1549 prefs->RegisterIntegerPref(prefs::kExtensionToolbarSize, -1); 1549 prefs->RegisterIntegerPref(prefs::kExtensionToolbarSize,
1550 prefs->RegisterDictionaryPref(kExtensionsBlacklistUpdate); 1550 -1,
1551 prefs->RegisterListPref(prefs::kExtensionInstallAllowList); 1551 false /* don't sync pref */);
1552 prefs->RegisterListPref(prefs::kExtensionInstallDenyList); 1552 prefs->RegisterDictionaryPref(kExtensionsBlacklistUpdate,
1553 prefs->RegisterListPref(prefs::kExtensionInstallForceList); 1553 false /* don't sync pref */);
1554 prefs->RegisterStringPref(kWebStoreLogin, std::string() /* default_value */); 1554 prefs->RegisterListPref(prefs::kExtensionInstallAllowList,
1555 false /* don't sync pref */);
1556 prefs->RegisterListPref(prefs::kExtensionInstallDenyList,
1557 false /* don't sync pref */);
1558 prefs->RegisterListPref(prefs::kExtensionInstallForceList,
1559 false /* don't sync pref */);
1560 prefs->RegisterStringPref(kWebStoreLogin,
1561 std::string() /* default_value */,
1562 false /* don't sync pref */);
1555 } 1563 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698