| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 } | 239 } |
| 240 | 240 |
| 241 ContentSettingsStore* store = | 241 ContentSettingsStore* store = |
| 242 ContentSettingsService::Get(GetProfile())->content_settings_store(); | 242 ContentSettingsService::Get(GetProfile())->content_settings_store(); |
| 243 store->SetExtensionContentSetting(extension_id(), primary_pattern, | 243 store->SetExtensionContentSetting(extension_id(), primary_pattern, |
| 244 secondary_pattern, content_type, | 244 secondary_pattern, content_type, |
| 245 resource_identifier, setting, scope); | 245 resource_identifier, setting, scope); |
| 246 return true; | 246 return true; |
| 247 } | 247 } |
| 248 | 248 |
| 249 bool ContentSettingsContentSettingGetResourceIdentifiersFunction::RunImpl() { | 249 bool ContentSettingsContentSettingGetResourceIdentifiersFunction::RunAsync() { |
| 250 ContentSettingsType content_type; | 250 ContentSettingsType content_type; |
| 251 EXTENSION_FUNCTION_VALIDATE(RemoveContentType(args_.get(), &content_type)); | 251 EXTENSION_FUNCTION_VALIDATE(RemoveContentType(args_.get(), &content_type)); |
| 252 | 252 |
| 253 if (content_type != CONTENT_SETTINGS_TYPE_PLUGINS) { | 253 if (content_type != CONTENT_SETTINGS_TYPE_PLUGINS) { |
| 254 SendResponse(true); | 254 SendResponse(true); |
| 255 return true; | 255 return true; |
| 256 } | 256 } |
| 257 | 257 |
| 258 PluginService::GetInstance()->GetPlugins( | 258 PluginService::GetInstance()->GetPlugins( |
| 259 base::Bind(&ContentSettingsContentSettingGetResourceIdentifiersFunction:: | 259 base::Bind(&ContentSettingsContentSettingGetResourceIdentifiersFunction:: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 283 SetResult(list); | 283 SetResult(list); |
| 284 BrowserThread::PostTask( | 284 BrowserThread::PostTask( |
| 285 BrowserThread::UI, FROM_HERE, base::Bind( | 285 BrowserThread::UI, FROM_HERE, base::Bind( |
| 286 &ContentSettingsContentSettingGetResourceIdentifiersFunction:: | 286 &ContentSettingsContentSettingGetResourceIdentifiersFunction:: |
| 287 SendResponse, | 287 SendResponse, |
| 288 this, | 288 this, |
| 289 true)); | 289 true)); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace extensions | 292 } // namespace extensions |
| OLD | NEW |