| 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/extensions/api/content_settings/content_settings_api.h" | 5 #include "chrome/browser/extensions/api/content_settings/content_settings_api.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 return false; | 197 return false; |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 std::string resource_identifier; | 201 std::string resource_identifier; |
| 202 if (params->details.resource_identifier.get()) | 202 if (params->details.resource_identifier.get()) |
| 203 resource_identifier = params->details.resource_identifier->id; | 203 resource_identifier = params->details.resource_identifier->id; |
| 204 | 204 |
| 205 std::string setting_str; | 205 std::string setting_str; |
| 206 EXTENSION_FUNCTION_VALIDATE( | 206 EXTENSION_FUNCTION_VALIDATE( |
| 207 params->details.setting.value().GetAsString(&setting_str)); | 207 params->details.setting->GetAsString(&setting_str)); |
| 208 ContentSetting setting; | 208 ContentSetting setting; |
| 209 EXTENSION_FUNCTION_VALIDATE( | 209 EXTENSION_FUNCTION_VALIDATE( |
| 210 helpers::StringToContentSetting(setting_str, &setting)); | 210 helpers::StringToContentSetting(setting_str, &setting)); |
| 211 EXTENSION_FUNCTION_VALIDATE( | 211 EXTENSION_FUNCTION_VALIDATE( |
| 212 HostContentSettingsMap::IsSettingAllowedForType(profile()->GetPrefs(), | 212 HostContentSettingsMap::IsSettingAllowedForType(profile()->GetPrefs(), |
| 213 setting, | 213 setting, |
| 214 content_type)); | 214 content_type)); |
| 215 | 215 |
| 216 ExtensionPrefsScope scope = kExtensionPrefsScopeRegular; | 216 ExtensionPrefsScope scope = kExtensionPrefsScopeRegular; |
| 217 bool incognito = false; | 217 bool incognito = false; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 &GetResourceIdentifiersFunction::SendResponse, this, true)); | 292 &GetResourceIdentifiersFunction::SendResponse, this, true)); |
| 293 } | 293 } |
| 294 | 294 |
| 295 // static | 295 // static |
| 296 void GetResourceIdentifiersFunction::SetPluginsForTesting( | 296 void GetResourceIdentifiersFunction::SetPluginsForTesting( |
| 297 const std::vector<webkit::WebPluginInfo>* plugins) { | 297 const std::vector<webkit::WebPluginInfo>* plugins) { |
| 298 g_testing_plugins_ = plugins; | 298 g_testing_plugins_ = plugins; |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace extensions | 301 } // namespace extensions |
| OLD | NEW |