Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Side by Side Diff: chrome/browser/extensions/api/content_settings/content_settings_api.cc

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698