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

Side by Side Diff: chrome/browser/content_settings/content_settings_pref_provider.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 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) 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/content_settings/content_settings_pref_provider.h" 5 #include "chrome/browser/content_settings/content_settings_pref_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 } // namespace 66 } // namespace
67 67
68 namespace content_settings { 68 namespace content_settings {
69 69
70 // //////////////////////////////////////////////////////////////////////////// 70 // ////////////////////////////////////////////////////////////////////////////
71 // PrefProvider: 71 // PrefProvider:
72 // 72 //
73 73
74 // static 74 // static
75 void PrefProvider::RegisterUserPrefs(PrefRegistrySyncable* registry) { 75 void PrefProvider::RegisterUserPrefs(
76 user_prefs::PrefRegistrySyncable* registry) {
76 registry->RegisterIntegerPref( 77 registry->RegisterIntegerPref(
77 prefs::kContentSettingsVersion, 78 prefs::kContentSettingsVersion,
78 ContentSettingsPattern::kContentSettingsPatternVersion, 79 ContentSettingsPattern::kContentSettingsPatternVersion,
79 PrefRegistrySyncable::UNSYNCABLE_PREF); 80 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
80 registry->RegisterDictionaryPref(prefs::kContentSettingsPatternPairs, 81 registry->RegisterDictionaryPref(
81 PrefRegistrySyncable::SYNCABLE_PREF); 82 prefs::kContentSettingsPatternPairs,
83 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
82 } 84 }
83 85
84 PrefProvider::PrefProvider(PrefService* prefs, 86 PrefProvider::PrefProvider(PrefService* prefs,
85 bool incognito) 87 bool incognito)
86 : prefs_(prefs), 88 : prefs_(prefs),
87 is_incognito_(incognito), 89 is_incognito_(incognito),
88 updating_preferences_(false) { 90 updating_preferences_(false) {
89 DCHECK(prefs_); 91 DCHECK(prefs_);
90 // Verify preferences version. 92 // Verify preferences version.
91 if (!prefs_->HasPrefPath(prefs::kContentSettingsVersion)) { 93 if (!prefs_->HasPrefPath(prefs::kContentSettingsVersion)) {
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 565
564 void PrefProvider::AssertLockNotHeld() const { 566 void PrefProvider::AssertLockNotHeld() const {
565 #if !defined(NDEBUG) 567 #if !defined(NDEBUG)
566 // |Lock::Acquire()| will assert if the lock is held by this thread. 568 // |Lock::Acquire()| will assert if the lock is held by this thread.
567 lock_.Acquire(); 569 lock_.Acquire();
568 lock_.Release(); 570 lock_.Release();
569 #endif 571 #endif
570 } 572 }
571 573
572 } // namespace content_settings 574 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698