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

Side by Side Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 2484353002: Unflake AppViewTest.TestAppViewGoodDataShouldSucceed under UBSan Vptr. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 OnCompleted(browser_context, extension_info_map, request, 960 OnCompleted(browser_context, extension_info_map, request,
961 request->status().error()); 961 request->status().error());
962 } 962 }
963 963
964 void ExtensionWebRequestEventRouter::OnErrorOccurred( 964 void ExtensionWebRequestEventRouter::OnErrorOccurred(
965 void* browser_context, 965 void* browser_context,
966 const InfoMap* extension_info_map, 966 const InfoMap* extension_info_map,
967 net::URLRequest* request, 967 net::URLRequest* request,
968 bool started, 968 bool started,
969 int net_error) { 969 int net_error) {
970 ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get();
971 if (!client) {
lazyboy 2016/11/09 00:10:11 I'd add a comment here saying |client| could be nu
krasin1 2016/11/09 00:36:05 Done.
972 return;
973 }
970 ExtensionNavigationUIData* navigation_ui_data = 974 ExtensionNavigationUIData* navigation_ui_data =
971 ExtensionsBrowserClient::Get()->GetExtensionNavigationUIData(request); 975 client->GetExtensionNavigationUIData(request);
972 // We hide events from the system context as well as sensitive requests. 976 // We hide events from the system context as well as sensitive requests.
973 // However, if the request first became sensitive after redirecting we have 977 // However, if the request first became sensitive after redirecting we have
974 // already signaled it and thus we have to signal the end of it. This is 978 // already signaled it and thus we have to signal the end of it. This is
975 // risk-free because the handler cannot modify the request now. 979 // risk-free because the handler cannot modify the request now.
976 if (!browser_context || 980 if (!browser_context ||
977 (WebRequestPermissions::HideRequest(extension_info_map, request, 981 (WebRequestPermissions::HideRequest(extension_info_map, request,
978 navigation_ui_data) && 982 navigation_ui_data) &&
979 !WasSignaled(*request))) { 983 !WasSignaled(*request))) {
980 return; 984 return;
981 } 985 }
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 // Since EventListeners are segmented by browser_context, check that 2358 // Since EventListeners are segmented by browser_context, check that
2355 // last, as it is exceedingly unlikely to be different. 2359 // last, as it is exceedingly unlikely to be different.
2356 return extension_id == that.extension_id && 2360 return extension_id == that.extension_id &&
2357 sub_event_name == that.sub_event_name && 2361 sub_event_name == that.sub_event_name &&
2358 web_view_instance_id == that.web_view_instance_id && 2362 web_view_instance_id == that.web_view_instance_id &&
2359 embedder_process_id == that.embedder_process_id && 2363 embedder_process_id == that.embedder_process_id &&
2360 browser_context == that.browser_context; 2364 browser_context == that.browser_context;
2361 } 2365 }
2362 2366
2363 } // namespace extensions 2367 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698