| 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_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/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "chrome/browser/content_settings/content_settings_rule.h" | 14 #include "chrome/browser/content_settings/content_settings_rule.h" |
| 15 #include "chrome/browser/content_settings/content_settings_utils.h" | 15 #include "chrome/browser/content_settings/content_settings_utils.h" |
| 16 #include "chrome/browser/prefs/pref_service.h" | 16 #include "chrome/browser/prefs/pref_service.h" |
| 17 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 17 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 18 #include "chrome/common/chrome_notification_types.h" | 18 #include "chrome/common/chrome_notification_types.h" |
| 19 #include "chrome/common/content_settings.h" | 19 #include "chrome/common/content_settings.h" |
| 20 #include "chrome/common/content_settings_pattern.h" | 20 #include "chrome/common/content_settings_pattern.h" |
| 21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
| 22 #include "content/browser/user_metrics.h" | |
| 23 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/browser/notification_details.h" | 23 #include "content/public/browser/notification_details.h" |
| 25 #include "content/public/browser/notification_source.h" | 24 #include "content/public/browser/notification_source.h" |
| 25 #include "content/public/browser/user_metrics.h" |
| 26 #include "googleurl/src/gurl.h" | 26 #include "googleurl/src/gurl.h" |
| 27 | 27 |
| 28 using content::BrowserThread; | 28 using content::BrowserThread; |
| 29 using content::UserMetricsAction; |
| 29 | 30 |
| 30 namespace { | 31 namespace { |
| 31 | 32 |
| 32 // The default setting for each content type. | 33 // The default setting for each content type. |
| 33 const ContentSetting kDefaultSettings[] = { | 34 const ContentSetting kDefaultSettings[] = { |
| 34 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_COOKIES | 35 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_COOKIES |
| 35 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_IMAGES | 36 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_IMAGES |
| 36 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT | 37 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT |
| 37 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS | 38 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS |
| 38 CONTENT_SETTING_BLOCK, // CONTENT_SETTINGS_TYPE_POPUPS | 39 CONTENT_SETTING_BLOCK, // CONTENT_SETTINGS_TYPE_POPUPS |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 SetWebsiteSetting( | 386 SetWebsiteSetting( |
| 386 ContentSettingsPattern::Wildcard(), | 387 ContentSettingsPattern::Wildcard(), |
| 387 ContentSettingsPattern::Wildcard(), | 388 ContentSettingsPattern::Wildcard(), |
| 388 CONTENT_SETTINGS_TYPE_GEOLOCATION, | 389 CONTENT_SETTINGS_TYPE_GEOLOCATION, |
| 389 std::string(), | 390 std::string(), |
| 390 value->DeepCopy()); | 391 value->DeepCopy()); |
| 391 } | 392 } |
| 392 } | 393 } |
| 393 | 394 |
| 394 } // namespace content_settings | 395 } // namespace content_settings |
| OLD | NEW |