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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host.cc

Issue 7134017: Make safe browsing work in a multi-profile environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 route_id, 487 route_id,
488 this); 488 this);
489 } 489 }
490 490
491 // Insert a buffered event handler before the actual one. 491 // Insert a buffered event handler before the actual one.
492 handler = new BufferedResourceHandler(handler, this, request); 492 handler = new BufferedResourceHandler(handler, this, request);
493 493
494 if (delegate_) { 494 if (delegate_) {
495 bool sub = request_data.resource_type != ResourceType::MAIN_FRAME; 495 bool sub = request_data.resource_type != ResourceType::MAIN_FRAME;
496 handler = delegate_->RequestBeginning( 496 handler = delegate_->RequestBeginning(
497 handler, request, sub, child_id, route_id); 497 handler, request, filter_->resource_context().safe_browsing_enabled(),
498 sub, child_id, route_id);
498 } 499 }
499 500
500 // Make extra info and read footer (contains request ID). 501 // Make extra info and read footer (contains request ID).
501 ResourceDispatcherHostRequestInfo* extra_info = 502 ResourceDispatcherHostRequestInfo* extra_info =
502 new ResourceDispatcherHostRequestInfo( 503 new ResourceDispatcherHostRequestInfo(
503 handler, 504 handler,
504 process_type, 505 process_type,
505 child_id, 506 child_id,
506 route_id, 507 route_id,
507 request_data.origin_pid, 508 request_data.origin_pid,
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 new DownloadResourceHandler(this, 704 new DownloadResourceHandler(this,
704 child_id, 705 child_id,
705 route_id, 706 route_id,
706 request_id_, 707 request_id_,
707 url, 708 url,
708 download_file_manager_.get(), 709 download_file_manager_.get(),
709 request, 710 request,
710 prompt_for_save_location, 711 prompt_for_save_location,
711 save_info)); 712 save_info));
712 713
713 if (delegate_) 714 if (delegate_) {
714 handler = delegate_->DownloadStarting(handler, child_id, route_id); 715 handler = delegate_->DownloadStarting(
716 handler,
717 filter_->resource_context().safe_browsing_enabled(),
718 child_id, route_id);
719 }
715 720
716 const net::URLRequestContext* request_context = context.request_context(); 721 const net::URLRequestContext* request_context = context.request_context();
717 722
718 if (!request_context->job_factory()->IsHandledURL(url)) { 723 if (!request_context->job_factory()->IsHandledURL(url)) {
719 VLOG(1) << "Download request for unsupported protocol: " 724 VLOG(1) << "Download request for unsupported protocol: "
720 << url.possibly_invalid_spec(); 725 << url.possibly_invalid_spec();
721 return; 726 return;
722 } 727 }
723 728
724 request->set_method("GET"); 729 request->set_method("GET");
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2004 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; 2009 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS;
2005 } 2010 }
2006 2011
2007 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { 2012 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() {
2008 return allow_cross_origin_auth_prompt_; 2013 return allow_cross_origin_auth_prompt_;
2009 } 2014 }
2010 2015
2011 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { 2016 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) {
2012 allow_cross_origin_auth_prompt_ = value; 2017 allow_cross_origin_auth_prompt_ = value;
2013 } 2018 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698