| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/browser/browser_thread.h" | 21 #include "content/browser/browser_thread.h" |
| 22 #include "content/browser/user_metrics.h" | 22 #include "content/browser/user_metrics.h" |
| 23 #include "content/common/notification_service.h" | 23 #include "content/common/notification_service.h" |
| 24 #include "content/common/notification_source.h" | 24 #include "content/common/notification_source.h" |
| 25 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // The default setting for each content type. | 29 // The default setting for each content type. |
| 30 const ContentSetting kDefaultSettings[] = { | 30 const ContentSetting kDefaultSettings[] = { |
| 31 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_COOKIES | 31 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_COOKIES |
| 32 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_IMAGES | 32 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_IMAGES |
| 33 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT | 33 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT |
| 34 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS | 34 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS |
| 35 CONTENT_SETTING_BLOCK, // CONTENT_SETTINGS_TYPE_POPUPS | 35 CONTENT_SETTING_BLOCK, // CONTENT_SETTINGS_TYPE_POPUPS |
| 36 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_GEOLOCATION | 36 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_GEOLOCATION |
| 37 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_NOTIFICATIONS | 37 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_NOTIFICATIONS |
| 38 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_INTENTS | 38 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_INTENTS |
| 39 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE | 39 CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE |
| 40 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_FULLSCREEN | 40 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_FULLSCREEN |
| 41 }; | 41 }; |
| 42 COMPILE_ASSERT(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES, | 42 COMPILE_ASSERT(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES, |
| 43 default_settings_incorrect_size); | 43 default_settings_incorrect_size); |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 namespace content_settings { | 47 namespace content_settings { |
| 48 | 48 |
| 49 namespace { | 49 namespace { |
| 50 | 50 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 SetContentSetting( | 319 SetContentSetting( |
| 320 ContentSettingsPattern::Wildcard(), | 320 ContentSettingsPattern::Wildcard(), |
| 321 ContentSettingsPattern::Wildcard(), | 321 ContentSettingsPattern::Wildcard(), |
| 322 CONTENT_SETTINGS_TYPE_GEOLOCATION, | 322 CONTENT_SETTINGS_TYPE_GEOLOCATION, |
| 323 std::string(), | 323 std::string(), |
| 324 setting); | 324 setting); |
| 325 } | 325 } |
| 326 } | 326 } |
| 327 | 327 |
| 328 } // namespace content_settings | 328 } // namespace content_settings |
| OLD | NEW |