| 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_policy_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_policy_provider.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "chrome/browser/content_settings/content_settings_pattern.h" | 11 #include "chrome/browser/content_settings/content_settings_pattern.h" |
| 12 #include "chrome/browser/content_settings/content_settings_utils.h" | 12 #include "chrome/browser/content_settings/content_settings_utils.h" |
| 13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
| 14 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 14 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "content/browser/browser_thread.h" | 18 #include "content/browser/browser_thread.h" |
| 19 #include "content/common/notification_service.h" | 19 #include "content/common/notification_service.h" |
| 20 #include "content/common/notification_source.h" | 20 #include "content/common/notification_source.h" |
| 21 #include "webkit/plugins/npapi/plugin_group.h" | 21 #include "webkit/plugins/npapi/plugin_group.h" |
| 22 #include "webkit/plugins/npapi/plugin_list.h" | 22 #include "webkit/plugins/npapi/plugin_list.h" |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 // Base pref path of the prefs that contain the managed default content | |
| 27 // settings values. | |
| 28 const std::string kManagedSettings = | |
| 29 "profile.managed_default_content_settings"; | |
| 30 | |
| 31 // The preferences used to manage ContentSettingsTypes. | 26 // The preferences used to manage ContentSettingsTypes. |
| 32 const char* kPrefToManageType[CONTENT_SETTINGS_NUM_TYPES] = { | 27 const char* kPrefToManageType[CONTENT_SETTINGS_NUM_TYPES] = { |
| 33 prefs::kManagedDefaultCookiesSetting, | 28 prefs::kManagedDefaultCookiesSetting, |
| 34 prefs::kManagedDefaultImagesSetting, | 29 prefs::kManagedDefaultImagesSetting, |
| 35 prefs::kManagedDefaultJavaScriptSetting, | 30 prefs::kManagedDefaultJavaScriptSetting, |
| 36 prefs::kManagedDefaultPluginsSetting, | 31 prefs::kManagedDefaultPluginsSetting, |
| 37 prefs::kManagedDefaultPopupsSetting, | 32 prefs::kManagedDefaultPopupsSetting, |
| 38 prefs::kManagedDefaultGeolocationSetting, | 33 prefs::kManagedDefaultGeolocationSetting, |
| 39 prefs::kManagedDefaultNotificationsSetting, | 34 prefs::kManagedDefaultNotificationsSetting, |
| 40 NULL, | 35 NULL, |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 ContentSettingsPattern(), | 467 ContentSettingsPattern(), |
| 473 CONTENT_SETTINGS_TYPE_DEFAULT, | 468 CONTENT_SETTINGS_TYPE_DEFAULT, |
| 474 std::string()); | 469 std::string()); |
| 475 } | 470 } |
| 476 } else { | 471 } else { |
| 477 NOTREACHED() << "Unexpected notification"; | 472 NOTREACHED() << "Unexpected notification"; |
| 478 } | 473 } |
| 479 } | 474 } |
| 480 | 475 |
| 481 } // namespace content_settings | 476 } // namespace content_settings |
| OLD | NEW |