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

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

Issue 2156763003: Extend the webRequest.onCompleted event details object with TLS/SSL information Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 EventListeners listeners = 901 EventListeners listeners =
902 GetMatchingListeners(browser_context, extension_info_map, 902 GetMatchingListeners(browser_context, extension_info_map,
903 keys::kOnCompletedEvent, request, &extra_info_spec); 903 keys::kOnCompletedEvent, request, &extra_info_spec);
904 if (listeners.empty()) 904 if (listeners.empty())
905 return; 905 return;
906 906
907 std::unique_ptr<WebRequestEventDetails> event_details( 907 std::unique_ptr<WebRequestEventDetails> event_details(
908 CreateEventDetails(request, extra_info_spec)); 908 CreateEventDetails(request, extra_info_spec));
909 event_details->SetResponseHeaders(request, request->response_headers()); 909 event_details->SetResponseHeaders(request, request->response_headers());
910 event_details->SetResponseSource(request); 910 event_details->SetResponseSource(request);
911 if (request->ssl_info().is_valid())
912 event_details->SetSSLInfo(request);
911 913
912 DispatchEvent(browser_context, request, listeners, std::move(event_details)); 914 DispatchEvent(browser_context, request, listeners, std::move(event_details));
913 } 915 }
914 916
915 void ExtensionWebRequestEventRouter::OnErrorOccurred( 917 void ExtensionWebRequestEventRouter::OnErrorOccurred(
916 void* browser_context, 918 void* browser_context,
917 const InfoMap* extension_info_map, 919 const InfoMap* extension_info_map,
918 net::URLRequest* request, 920 net::URLRequest* request,
919 bool started) { 921 bool started) {
920 // We hide events from the system context as well as sensitive requests. 922 // We hide events from the system context as well as sensitive requests.
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 // Continue gracefully. 2254 // Continue gracefully.
2253 RunSync(); 2255 RunSync();
2254 } 2256 }
2255 2257
2256 bool WebRequestHandlerBehaviorChangedFunction::RunSync() { 2258 bool WebRequestHandlerBehaviorChangedFunction::RunSync() {
2257 helpers::ClearCacheOnNavigation(); 2259 helpers::ClearCacheOnNavigation();
2258 return true; 2260 return true;
2259 } 2261 }
2260 2262
2261 } // namespace extensions 2263 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698