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 "extensions/browser/api/web_request/web_request_api.h" | 5 #include "extensions/browser/api/web_request/web_request_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1828 net::URLRequest* request, | 1828 net::URLRequest* request, |
1829 RequestStage request_stage, | 1829 RequestStage request_stage, |
1830 const net::HttpResponseHeaders* original_response_headers) { | 1830 const net::HttpResponseHeaders* original_response_headers) { |
1831 WebViewRendererState::WebViewInfo web_view_info; | 1831 WebViewRendererState::WebViewInfo web_view_info; |
1832 bool is_web_view_guest = GetWebViewInfo(request, &web_view_info); | 1832 bool is_web_view_guest = GetWebViewInfo(request, &web_view_info); |
1833 int rules_registry_id = is_web_view_guest | 1833 int rules_registry_id = is_web_view_guest |
1834 ? web_view_info.rules_registry_id | 1834 ? web_view_info.rules_registry_id |
1835 : RulesRegistryService::kDefaultRulesRegistryID; | 1835 : RulesRegistryService::kDefaultRulesRegistryID; |
1836 | 1836 |
1837 RulesRegistryKey rules_key(browser_context, rules_registry_id); | 1837 RulesRegistryKey rules_key(browser_context, rules_registry_id); |
1838 // If this check fails, check that the active stages are up-to-date in | 1838 // If this check fails, check that the active stages are up to date in |
1839 // extensions/browser/api/declarative_webrequest/request_stage.h . | 1839 // extensions/browser/api/declarative_webrequest/request_stage.h . |
1840 DCHECK(request_stage & kActiveStages); | 1840 DCHECK(request_stage & kActiveStages); |
1841 | 1841 |
1842 // Rules of the current |browser_context| may apply but we need to check also | 1842 // Rules of the current |browser_context| may apply but we need to check also |
1843 // whether there are applicable rules from extensions whose background page | 1843 // whether there are applicable rules from extensions whose background page |
1844 // spans from regular to incognito mode. | 1844 // spans from regular to incognito mode. |
1845 | 1845 |
1846 // First parameter identifies the registry, the second indicates whether the | 1846 // First parameter identifies the registry, the second indicates whether the |
1847 // registry belongs to the cross browser_context. | 1847 // registry belongs to the cross browser_context. |
1848 using RelevantRegistry = std::pair<WebRequestRulesRegistry*, bool>; | 1848 using RelevantRegistry = std::pair<WebRequestRulesRegistry*, bool>; |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2294 // Continue gracefully. | 2294 // Continue gracefully. |
2295 RunSync(); | 2295 RunSync(); |
2296 } | 2296 } |
2297 | 2297 |
2298 bool WebRequestHandlerBehaviorChangedFunction::RunSync() { | 2298 bool WebRequestHandlerBehaviorChangedFunction::RunSync() { |
2299 helpers::ClearCacheOnNavigation(); | 2299 helpers::ClearCacheOnNavigation(); |
2300 return true; | 2300 return true; |
2301 } | 2301 } |
2302 | 2302 |
2303 } // namespace extensions | 2303 } // namespace extensions |
OLD | NEW |