Commit dff8fb56 authored by hanxi's avatar hanxi Committed by Commit bot

Use RulesRegistry::WebViewKey to replace RulesRegistryService::WebViewKey in web_request_api.

BUG=352293

Review URL: https://codereview.chromium.org/583233003

Cr-Commit-Position: refs/heads/master@{#295829}
parent 65e2bfc9
...@@ -708,7 +708,7 @@ ExtensionWebRequestEventRouter::~ExtensionWebRequestEventRouter() { ...@@ -708,7 +708,7 @@ ExtensionWebRequestEventRouter::~ExtensionWebRequestEventRouter() {
void ExtensionWebRequestEventRouter::RegisterRulesRegistry( void ExtensionWebRequestEventRouter::RegisterRulesRegistry(
void* profile, void* profile,
const RulesRegistryService::WebViewKey& webview_key, const extensions::RulesRegistry::WebViewKey& webview_key,
scoped_refptr<extensions::WebRequestRulesRegistry> rules_registry) { scoped_refptr<extensions::WebRequestRulesRegistry> rules_registry) {
RulesRegistryKey key(profile, webview_key); RulesRegistryKey key(profile, webview_key);
if (rules_registry.get()) if (rules_registry.get())
...@@ -1979,7 +1979,7 @@ bool ExtensionWebRequestEventRouter::ProcessDeclarativeRules( ...@@ -1979,7 +1979,7 @@ bool ExtensionWebRequestEventRouter::ProcessDeclarativeRules(
extensions::WebViewRendererState::WebViewInfo web_view_info; extensions::WebViewRendererState::WebViewInfo web_view_info;
bool is_web_view_guest = GetWebViewInfo(request, &web_view_info); bool is_web_view_guest = GetWebViewInfo(request, &web_view_info);
RulesRegistryService::WebViewKey webview_key( extensions::RulesRegistry::WebViewKey webview_key(
is_web_view_guest ? web_view_info.embedder_process_id : 0, is_web_view_guest ? web_view_info.embedder_process_id : 0,
is_web_view_guest ? web_view_info.instance_id : 0); is_web_view_guest ? web_view_info.instance_id : 0);
RulesRegistryKey rules_key(profile, webview_key); RulesRegistryKey rules_key(profile, webview_key);
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
#include "content/public/common/resource_type.h" #include "content/public/common/resource_type.h"
#include "extensions/browser/api/declarative/rules_registry.h"
#include "extensions/browser/api/declarative_webrequest/request_stage.h" #include "extensions/browser/api/declarative_webrequest/request_stage.h"
#include "extensions/browser/api/web_request/web_request_api_helpers.h" #include "extensions/browser/api/web_request/web_request_api_helpers.h"
#include "extensions/browser/api/web_request/web_request_permissions.h" #include "extensions/browser/api/web_request/web_request_permissions.h"
...@@ -171,7 +171,7 @@ class ExtensionWebRequestEventRouter ...@@ -171,7 +171,7 @@ class ExtensionWebRequestEventRouter
// the rule registry for |profile|. // the rule registry for |profile|.
void RegisterRulesRegistry( void RegisterRulesRegistry(
void* profile, void* profile,
const extensions::RulesRegistryService::WebViewKey& webview_key, const extensions::RulesRegistry::WebViewKey& webview_key,
scoped_refptr<extensions::WebRequestRulesRegistry> rules_registry); scoped_refptr<extensions::WebRequestRulesRegistry> rules_registry);
// Dispatches the OnBeforeRequest event to any extensions whose filters match // Dispatches the OnBeforeRequest event to any extensions whose filters match
...@@ -456,7 +456,7 @@ class ExtensionWebRequestEventRouter ...@@ -456,7 +456,7 @@ class ExtensionWebRequestEventRouter
CallbacksForPageLoad callbacks_for_page_load_; CallbacksForPageLoad callbacks_for_page_load_;
typedef std::pair<void*, extensions::RulesRegistryService::WebViewKey> typedef std::pair<void*, extensions::RulesRegistry::WebViewKey>
RulesRegistryKey; RulesRegistryKey;
// Maps each profile (and OTRProfile) and a webview key to its respective // Maps each profile (and OTRProfile) and a webview key to its respective
// rules registry. // rules registry.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment