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

Unified Diff: extensions/browser/api/web_request/web_request_api_helpers.cc

Issue 670173002: Fix webrequest api for webview in webui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scoped_refptr not testable Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/web_request/web_request_api_helpers.cc
diff --git a/extensions/browser/api/web_request/web_request_api_helpers.cc b/extensions/browser/api/web_request/web_request_api_helpers.cc
index 680a9532eef0864765dc3e0efae169d5a5aa9446..825b0bd631199d2f35f71fbc3168a1f214e60036 100644
--- a/extensions/browser/api/web_request/web_request_api_helpers.cc
+++ b/extensions/browser/api/web_request/web_request_api_helpers.cc
@@ -1206,9 +1206,11 @@ void NotifyWebRequestAPIUsed(
extensions::RuntimeData* runtime_data =
extensions::ExtensionSystem::Get(browser_context)->runtime_data();
- if (runtime_data->HasUsedWebRequest(extension.get()))
- return;
- runtime_data->SetHasUsedWebRequest(extension.get(), true);
+ if (extension.get()) {
+ if (runtime_data->HasUsedWebRequest(extension.get()))
+ return;
+ runtime_data->SetHasUsedWebRequest(extension.get(), true);
+ }
for (content::RenderProcessHost::iterator it =
content::RenderProcessHost::AllHostsIterator();
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698