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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_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/web_request/web_request_api.h" 5 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 ExtensionWarningSet warnings; 2410 ExtensionWarningSet warnings;
2411 warnings.insert( 2411 warnings.insert(
2412 ExtensionWarning::CreateRepeatedCacheFlushesWarning(extension_id())); 2412 ExtensionWarning::CreateRepeatedCacheFlushesWarning(extension_id()));
2413 BrowserThread::PostTask( 2413 BrowserThread::PostTask(
2414 BrowserThread::UI, 2414 BrowserThread::UI,
2415 FROM_HERE, 2415 FROM_HERE,
2416 base::Bind(&ExtensionWarningService::NotifyWarningsOnUI, 2416 base::Bind(&ExtensionWarningService::NotifyWarningsOnUI,
2417 profile_id(), warnings)); 2417 profile_id(), warnings));
2418 2418
2419 // Continue gracefully. 2419 // Continue gracefully.
2420 Run(); 2420 RunSync();
2421 } 2421 }
2422 2422
2423 bool WebRequestHandlerBehaviorChangedFunction::RunSync() { 2423 bool WebRequestHandlerBehaviorChangedFunction::RunSync() {
2424 helpers::ClearCacheOnNavigation(); 2424 helpers::ClearCacheOnNavigation();
2425 return true; 2425 return true;
2426 } 2426 }
2427 2427
2428 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host) { 2428 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host) {
2429 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 2429 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
2430 if (!profile) 2430 if (!profile)
(...skipping 14 matching lines...) Expand all
2445 } else if ((*it)->name().find("AdBlock") != std::string::npos) { 2445 } else if ((*it)->name().find("AdBlock") != std::string::npos) {
2446 adblock = true; 2446 adblock = true;
2447 } else { 2447 } else {
2448 other = true; 2448 other = true;
2449 } 2449 }
2450 } 2450 }
2451 } 2451 }
2452 2452
2453 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other)); 2453 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other));
2454 } 2454 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698