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

Side by Side Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 516663002: Introducing the OffDomainInclusionDetector to analyze resource requests for suspicious activity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: probably unecessary but harmless reset Created 6 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 | chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h » ('j') | 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 "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 return true; 308 return true;
309 } 309 }
310 310
311 void ChromeResourceDispatcherHostDelegate::RequestBeginning( 311 void ChromeResourceDispatcherHostDelegate::RequestBeginning(
312 net::URLRequest* request, 312 net::URLRequest* request,
313 content::ResourceContext* resource_context, 313 content::ResourceContext* resource_context,
314 content::AppCacheService* appcache_service, 314 content::AppCacheService* appcache_service,
315 ResourceType resource_type, 315 ResourceType resource_type,
316 ScopedVector<content::ResourceThrottle>* throttles) { 316 ScopedVector<content::ResourceThrottle>* throttles) {
317 if (safe_browsing_.get())
318 safe_browsing_->OnResourceRequest(request);
319
317 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); 320 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
318 bool is_prerendering = 321 bool is_prerendering =
319 info->GetVisibilityState() == blink::WebPageVisibilityStatePrerender; 322 info->GetVisibilityState() == blink::WebPageVisibilityStatePrerender;
320 if (is_prerendering) { 323 if (is_prerendering) {
321 // Requests with the IGNORE_LIMITS flag set (i.e., sync XHRs) 324 // Requests with the IGNORE_LIMITS flag set (i.e., sync XHRs)
322 // should remain at MAXIMUM_PRIORITY. 325 // should remain at MAXIMUM_PRIORITY.
323 if (request->load_flags() & net::LOAD_IGNORE_LIMITS) { 326 if (request->load_flags() & net::LOAD_IGNORE_LIMITS) {
324 DCHECK_EQ(request->priority(), net::MAXIMUM_PRIORITY); 327 DCHECK_EQ(request->priority(), net::MAXIMUM_PRIORITY);
325 } else { 328 } else {
326 request->SetPriority(net::IDLE); 329 request->SetPriority(net::IDLE);
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 url_request->GetTotalReceivedBytes())); 764 url_request->GetTotalReceivedBytes()));
762 } 765 }
763 } 766 }
764 767
765 // static 768 // static
766 void ChromeResourceDispatcherHostDelegate:: 769 void ChromeResourceDispatcherHostDelegate::
767 SetExternalProtocolHandlerDelegateForTesting( 770 SetExternalProtocolHandlerDelegateForTesting(
768 ExternalProtocolHandler::Delegate* delegate) { 771 ExternalProtocolHandler::Delegate* delegate) {
769 g_external_protocol_handler_delegate = delegate; 772 g_external_protocol_handler_delegate = delegate;
770 } 773 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698