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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 } // namespace 65 } // namespace
66 66
67 namespace content_settings { 67 namespace content_settings {
68 68
69 // //////////////////////////////////////////////////////////////////////////// 69 // ////////////////////////////////////////////////////////////////////////////
70 // PrefProvider: 70 // PrefProvider:
71 // 71 //
72 72
73 // static 73 // static
74 void PrefProvider::RegisterUserPrefs(PrefService* prefs) { 74 void PrefProvider::RegisterUserPrefs(PrefServiceSyncable* prefs) {
75 prefs->RegisterIntegerPref( 75 prefs->RegisterIntegerPref(
76 prefs::kContentSettingsVersion, 76 prefs::kContentSettingsVersion,
77 ContentSettingsPattern::kContentSettingsPatternVersion, 77 ContentSettingsPattern::kContentSettingsPatternVersion,
78 PrefService::UNSYNCABLE_PREF); 78 PrefServiceSyncable::UNSYNCABLE_PREF);
79 prefs->RegisterDictionaryPref(prefs::kContentSettingsPatternPairs, 79 prefs->RegisterDictionaryPref(prefs::kContentSettingsPatternPairs,
80 PrefService::SYNCABLE_PREF); 80 PrefServiceSyncable::SYNCABLE_PREF);
81 } 81 }
82 82
83 PrefProvider::PrefProvider(PrefService* prefs, 83 PrefProvider::PrefProvider(PrefService* prefs,
84 bool incognito) 84 bool incognito)
85 : prefs_(prefs), 85 : prefs_(prefs),
86 is_incognito_(incognito), 86 is_incognito_(incognito),
87 updating_preferences_(false) { 87 updating_preferences_(false) {
88 DCHECK(prefs_); 88 DCHECK(prefs_);
89 // Verify preferences version. 89 // Verify preferences version.
90 if (!prefs_->HasPrefPath(prefs::kContentSettingsVersion)) { 90 if (!prefs_->HasPrefPath(prefs::kContentSettingsVersion)) {
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 void PrefProvider::AssertLockNotHeld() const { 541 void PrefProvider::AssertLockNotHeld() const {
542 #if !defined(NDEBUG) 542 #if !defined(NDEBUG)
543 // |Lock::Acquire()| will assert if the lock is held by this thread. 543 // |Lock::Acquire()| will assert if the lock is held by this thread.
544 lock_.Acquire(); 544 lock_.Acquire();
545 lock_.Release(); 545 lock_.Release();
546 #endif 546 #endif
547 } 547 }
548 548
549 } // namespace content_settings 549 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698