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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |