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

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

Issue 67019: URLRequest::Interceptor enhancements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.h ('k') | net/url_request/url_request.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/renderer_host/resource_dispatcher_host.h" 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 process_type, 395 process_type,
396 process_id, 396 process_id,
397 route_id, 397 route_id,
398 request_id, 398 request_id,
399 request_data.frame_origin, 399 request_data.frame_origin,
400 request_data.main_frame_origin, 400 request_data.main_frame_origin,
401 request_data.resource_type, 401 request_data.resource_type,
402 upload_size); 402 upload_size);
403 extra_info->allow_download = 403 extra_info->allow_download =
404 ResourceType::IsFrame(request_data.resource_type); 404 ResourceType::IsFrame(request_data.resource_type);
405 request->set_user_data(extra_info); // takes pointer ownership 405 SetExtraInfoForRequest(request, extra_info); // request takes ownership
406 406
407 BeginRequestInternal(request); 407 BeginRequestInternal(request);
408 } 408 }
409 409
410 void ResourceDispatcherHost::OnDataReceivedACK(int request_id) { 410 void ResourceDispatcherHost::OnDataReceivedACK(int request_id) {
411 DataReceivedACK(receiver_->GetProcessId(), request_id); 411 DataReceivedACK(receiver_->GetProcessId(), request_id);
412 } 412 }
413 413
414 void ResourceDispatcherHost::DataReceivedACK(int process_id, int request_id) { 414 void ResourceDispatcherHost::DataReceivedACK(int process_id, int request_id) {
415 PendingRequestList::iterator i = pending_requests_.find( 415 PendingRequestList::iterator i = pending_requests_.find(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 ChildProcessInfo::RENDER_PROCESS, 534 ChildProcessInfo::RENDER_PROCESS,
535 process_id, 535 process_id,
536 route_id, 536 route_id,
537 request_id_, 537 request_id_,
538 "null", // frame_origin 538 "null", // frame_origin
539 "null", // main_frame_origin 539 "null", // main_frame_origin
540 ResourceType::SUB_RESOURCE, 540 ResourceType::SUB_RESOURCE,
541 0 /* upload_size */); 541 0 /* upload_size */);
542 extra_info->allow_download = true; 542 extra_info->allow_download = true;
543 extra_info->is_download = true; 543 extra_info->is_download = true;
544 request->set_user_data(extra_info); // Takes pointer ownership. 544 SetExtraInfoForRequest(request, extra_info); // request takes ownership
545 545
546 BeginRequestInternal(request); 546 BeginRequestInternal(request);
547 } 547 }
548 548
549 // This function is only used for saving feature. 549 // This function is only used for saving feature.
550 void ResourceDispatcherHost::BeginSaveFile(const GURL& url, 550 void ResourceDispatcherHost::BeginSaveFile(const GURL& url,
551 const GURL& referrer, 551 const GURL& referrer,
552 int process_id, 552 int process_id,
553 int route_id, 553 int route_id,
554 URLRequestContext* request_context) { 554 URLRequestContext* request_context) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 process_id, 589 process_id,
590 route_id, 590 route_id,
591 request_id_, 591 request_id_,
592 "null", // frame_origin 592 "null", // frame_origin
593 "null", // main_frame_origin 593 "null", // main_frame_origin
594 ResourceType::SUB_RESOURCE, 594 ResourceType::SUB_RESOURCE,
595 0 /* upload_size */); 595 0 /* upload_size */);
596 // Just saving some resources we need, disallow downloading. 596 // Just saving some resources we need, disallow downloading.
597 extra_info->allow_download = false; 597 extra_info->allow_download = false;
598 extra_info->is_download = false; 598 extra_info->is_download = false;
599 request->set_user_data(extra_info); // Takes pointer ownership. 599 SetExtraInfoForRequest(request, extra_info); // request takes ownership
600 600
601 BeginRequestInternal(request); 601 BeginRequestInternal(request);
602 } 602 }
603 603
604 void ResourceDispatcherHost::CancelRequest(int process_id, 604 void ResourceDispatcherHost::CancelRequest(int process_id,
605 int request_id, 605 int request_id,
606 bool from_renderer) { 606 bool from_renderer) {
607 CancelRequest(process_id, request_id, from_renderer, true); 607 CancelRequest(process_id, request_id, from_renderer, true);
608 } 608 }
609 609
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 case ViewHostMsg_UploadProgress_ACK::ID: 1556 case ViewHostMsg_UploadProgress_ACK::ID:
1557 case ViewHostMsg_SyncLoad::ID: 1557 case ViewHostMsg_SyncLoad::ID:
1558 return true; 1558 return true;
1559 1559
1560 default: 1560 default:
1561 break; 1561 break;
1562 } 1562 }
1563 1563
1564 return false; 1564 return false;
1565 } 1565 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698