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

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

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased Created 3 years, 5 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 <memory> 7 #include <memory>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/metrics/histogram_macros.h" 12 #include "base/metrics/histogram_macros.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
15 #include "components/content_settings/core/browser/content_settings_info.h" 15 #include "components/content_settings/core/browser/content_settings_info.h"
16 #include "components/content_settings/core/browser/content_settings_registry.h" 16 #include "components/content_settings/core/browser/content_settings_registry.h"
17 #include "components/content_settings/core/browser/content_settings_rule.h" 17 #include "components/content_settings/core/browser/content_settings_rule.h"
18 #include "components/content_settings/core/browser/content_settings_utils.h" 18 #include "components/content_settings/core/browser/content_settings_utils.h"
19 #include "components/content_settings/core/browser/host_content_settings_map.h" 19 #include "components/content_settings/core/browser/host_content_settings_map.h"
20 #include "components/content_settings/core/common/content_settings.h" 20 #include "components/content_settings/core/common/content_settings.h"
21 #include "components/content_settings/core/common/content_settings_pattern.h" 21 #include "components/content_settings/core/common/content_settings_pattern.h"
22 #include "components/content_settings/core/common/content_settings_utils.h"
22 #include "components/content_settings/core/common/pref_names.h" 23 #include "components/content_settings/core/common/pref_names.h"
23 #include "components/prefs/scoped_user_pref_update.h" 24 #include "components/prefs/scoped_user_pref_update.h"
24 #include "services/preferences/public/cpp/dictionary_value_update.h" 25 #include "services/preferences/public/cpp/dictionary_value_update.h"
25 #include "services/preferences/public/cpp/scoped_pref_update.h" 26 #include "services/preferences/public/cpp/scoped_pref_update.h"
26 #include "url/gurl.h" 27 #include "url/gurl.h"
27 28
28 namespace { 29 namespace {
29 30
30 const char kSettingPath[] = "setting"; 31 const char kSettingPath[] = "setting";
31 const char kLastModifiedPath[] = "last_modified"; 32 const char kLastModifiedPath[] = "last_modified";
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 489
489 void ContentSettingsPref::AssertLockNotHeld() const { 490 void ContentSettingsPref::AssertLockNotHeld() const {
490 #if !defined(NDEBUG) 491 #if !defined(NDEBUG)
491 // |Lock::Acquire()| will assert if the lock is held by this thread. 492 // |Lock::Acquire()| will assert if the lock is held by this thread.
492 lock_.Acquire(); 493 lock_.Acquire();
493 lock_.Release(); 494 lock_.Release();
494 #endif 495 #endif
495 } 496 }
496 497
497 } // namespace content_settings 498 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698