OLD | NEW |
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/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 |
11 #include "base/auto_reset.h" | 11 #include "base/auto_reset.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "chrome/browser/content_settings/content_settings_rule.h" | 15 #include "chrome/browser/content_settings/content_settings_rule.h" |
16 #include "chrome/browser/content_settings/content_settings_utils.h" | 16 #include "chrome/browser/content_settings/content_settings_utils.h" |
17 #include "chrome/browser/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
18 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 18 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
19 #include "chrome/common/chrome_notification_types.h" | 19 #include "chrome/common/chrome_notification_types.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/content_settings.h" | 21 #include "chrome/common/content_settings.h" |
22 #include "chrome/common/content_settings_pattern.h" | 22 #include "chrome/common/content_settings_pattern.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 #include "content/browser/user_metrics.h" | 24 #include "content/browser/user_metrics.h" |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/notification_details.h" | 26 #include "content/public/browser/notification_details.h" |
27 #include "content/public/browser/notification_source.h" | 27 #include "content/public/browser/notification_source.h" |
28 #include "googleurl/src/gurl.h" | 28 #include "googleurl/src/gurl.h" |
29 | 29 |
| 30 using content::BrowserThread; |
| 31 |
30 namespace { | 32 namespace { |
31 | 33 |
32 typedef std::pair<std::string, std::string> StringPair; | 34 typedef std::pair<std::string, std::string> StringPair; |
33 typedef std::map<std::string, std::string> StringMap; | 35 typedef std::map<std::string, std::string> StringMap; |
34 | 36 |
35 const char kPerPluginPrefName[] = "per_plugin"; | 37 const char kPerPluginPrefName[] = "per_plugin"; |
36 | 38 |
37 ContentSetting FixObsoleteCookiePromptMode(ContentSettingsType content_type, | 39 ContentSetting FixObsoleteCookiePromptMode(ContentSettingsType content_type, |
38 ContentSetting setting) { | 40 ContentSetting setting) { |
39 if (content_type == CONTENT_SETTINGS_TYPE_COOKIES && | 41 if (content_type == CONTENT_SETTINGS_TYPE_COOKIES && |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 | 1059 |
1058 void PrefProvider::AssertLockNotHeld() const { | 1060 void PrefProvider::AssertLockNotHeld() const { |
1059 #if !defined(NDEBUG) | 1061 #if !defined(NDEBUG) |
1060 // |Lock::Acquire()| will assert if the lock is held by this thread. | 1062 // |Lock::Acquire()| will assert if the lock is held by this thread. |
1061 lock_.Acquire(); | 1063 lock_.Acquire(); |
1062 lock_.Release(); | 1064 lock_.Release(); |
1063 #endif | 1065 #endif |
1064 } | 1066 } |
1065 | 1067 |
1066 } // namespace content_settings | 1068 } // namespace content_settings |
OLD | NEW |