Chromium Code Reviews| 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 | 5 |
| 6 #include "chrome/browser/content_settings/content_settings_base_provider.h" | 6 #include "chrome/browser/content_settings/content_settings_base_provider.h" |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 true, // CONTENT_SETTINGS_TYPE_PLUGINS | 22 true, // CONTENT_SETTINGS_TYPE_PLUGINS |
| 23 false, // CONTENT_SETTINGS_TYPE_POPUPS | 23 false, // CONTENT_SETTINGS_TYPE_POPUPS |
| 24 false, // Not used for Geolocation | 24 false, // Not used for Geolocation |
| 25 false, // Not used for Notifications | 25 false, // Not used for Notifications |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| 30 namespace content_settings { | 30 namespace content_settings { |
| 31 | 31 |
| 32 ExtendedContentSettings::ExtendedContentSettings() {} | |
| 33 | |
| 34 ExtendedContentSettings::ExtendedContentSettings( | |
| 35 const ExtendedContentSettings& rhs) | |
| 36 : content_settings(rhs.content_settings), | |
| 37 content_settings_for_resources(rhs.content_settings_for_resources) { | |
|
Nico
2011/02/15 21:25:37
this (can't rely on implicit copy constructors) is
Elliot Glaysher
2011/02/15 22:09:51
map of string to map of pair of enum and string to
| |
| 38 } | |
| 39 | |
| 40 ExtendedContentSettings::~ExtendedContentSettings() {} | |
| 41 | |
| 42 BaseProvider::BaseProvider(bool is_otr) | |
| 43 : is_off_the_record_(is_otr) { | |
|
Nico
2011/02/15 21:25:37
indent only 4
| |
| 44 } | |
| 45 | |
| 46 BaseProvider::~BaseProvider() {} | |
| 47 | |
| 32 bool BaseProvider::RequiresResourceIdentifier( | 48 bool BaseProvider::RequiresResourceIdentifier( |
| 33 ContentSettingsType content_type) const { | 49 ContentSettingsType content_type) const { |
| 34 if (CommandLine::ForCurrentProcess()->HasSwitch( | 50 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 35 switches::kEnableResourceContentSettings)) { | 51 switches::kEnableResourceContentSettings)) { |
| 36 return kRequiresResourceIdentifier[content_type]; | 52 return kRequiresResourceIdentifier[content_type]; |
| 37 } else { | 53 } else { |
| 38 return false; | 54 return false; |
| 39 } | 55 } |
| 40 } | 56 } |
| 41 | 57 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 if (setting == CONTENT_SETTING_ASK && | 243 if (setting == CONTENT_SETTING_ASK && |
| 228 content_type == CONTENT_SETTINGS_TYPE_PLUGINS && | 244 content_type == CONTENT_SETTINGS_TYPE_PLUGINS && |
| 229 !CommandLine::ForCurrentProcess()->HasSwitch( | 245 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 230 switches::kEnableClickToPlay)) { | 246 switches::kEnableClickToPlay)) { |
| 231 return CONTENT_SETTING_BLOCK; | 247 return CONTENT_SETTING_BLOCK; |
| 232 } | 248 } |
| 233 return setting; | 249 return setting; |
| 234 } | 250 } |
| 235 | 251 |
| 236 } // namespace content_settings | 252 } // namespace content_settings |
| OLD | NEW |