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

Side by Side Diff: components/content_settings/core/browser/content_settings_pref.cc

Issue 1252073002: Move pref names and default value into WebsiteSettingsInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@website-settings-registry-simple
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/content_settings/core/browser/content_settings_pref.h" 5 #include "components/content_settings/core/browser/content_settings_pref.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 namespace content_settings { 47 namespace content_settings {
48 48
49 ContentSettingsPref::ContentSettingsPref( 49 ContentSettingsPref::ContentSettingsPref(
50 ContentSettingsType content_type, 50 ContentSettingsType content_type,
51 PrefService* prefs, 51 PrefService* prefs,
52 PrefChangeRegistrar* registrar, 52 PrefChangeRegistrar* registrar,
53 const char* pref_name, 53 const std::string& pref_name,
54 bool incognito, 54 bool incognito,
55 NotifyObserversCallback notify_callback) 55 NotifyObserversCallback notify_callback)
56 : content_type_(content_type), 56 : content_type_(content_type),
57 prefs_(prefs), 57 prefs_(prefs),
58 registrar_(registrar), 58 registrar_(registrar),
59 pref_name_(pref_name), 59 pref_name_(pref_name),
60 is_incognito_(incognito), 60 is_incognito_(incognito),
61 updating_preferences_(false), 61 updating_preferences_(false),
62 notify_callback_(notify_callback) { 62 notify_callback_(notify_callback) {
63 DCHECK(prefs_); 63 DCHECK(prefs_);
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 508
509 void ContentSettingsPref::AssertLockNotHeld() const { 509 void ContentSettingsPref::AssertLockNotHeld() const {
510 #if !defined(NDEBUG) 510 #if !defined(NDEBUG)
511 // |Lock::Acquire()| will assert if the lock is held by this thread. 511 // |Lock::Acquire()| will assert if the lock is held by this thread.
512 lock_.Acquire(); 512 lock_.Acquire();
513 lock_.Release(); 513 lock_.Release();
514 #endif 514 #endif
515 } 515 }
516 516
517 } // namespace content_settings 517 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698