OLD | NEW |
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_default_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_default_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/bind.h" |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
13 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
14 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
15 #include "base/prefs/scoped_user_pref_update.h" | 16 #include "base/prefs/scoped_user_pref_update.h" |
16 #include "chrome/browser/chrome_notification_types.h" | |
17 #include "chrome/browser/content_settings/content_settings_utils.h" | 17 #include "chrome/browser/content_settings/content_settings_utils.h" |
18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
19 #include "components/content_settings/core/browser/content_settings_rule.h" | 19 #include "components/content_settings/core/browser/content_settings_rule.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/pref_registry/pref_registry_syncable.h" | 22 #include "components/pref_registry/pref_registry_syncable.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 #include "content/public/browser/notification_details.h" | |
25 #include "content/public/browser/notification_source.h" | |
26 #include "content/public/browser/user_metrics.h" | |
27 #include "url/gurl.h" | 24 #include "url/gurl.h" |
28 | 25 |
29 using base::UserMetricsAction; | |
30 using content::BrowserThread; | 26 using content::BrowserThread; |
31 | 27 |
32 namespace { | 28 namespace { |
33 | 29 |
34 // The default setting for each content type. | 30 // The default setting for each content type. |
35 const ContentSetting kDefaultSettings[] = { | 31 const ContentSetting kDefaultSettings[] = { |
36 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_COOKIES | 32 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_COOKIES |
37 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_IMAGES | 33 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_IMAGES |
38 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT | 34 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT |
39 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS | 35 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 // Migrate obsolete cookie prompt mode. | 336 // Migrate obsolete cookie prompt mode. |
341 if (ValueToContentSetting( | 337 if (ValueToContentSetting( |
342 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == | 338 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == |
343 CONTENT_SETTING_ASK) { | 339 CONTENT_SETTING_ASK) { |
344 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( | 340 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( |
345 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); | 341 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); |
346 } | 342 } |
347 } | 343 } |
348 | 344 |
349 } // namespace content_settings | 345 } // namespace content_settings |
OLD | NEW |