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

Side by Side Diff: content/browser/loader/sync_resource_handler.cc

Issue 2136223003: ResourceDispatcherHostDelegate::OnResponseStarted doesn't need IPC::Sender (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 "content/browser/loader/sync_resource_handler.h" 5 #include "content/browser/loader/sync_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/loader/netlog_observer.h" 8 #include "content/browser/loader/netlog_observer.h"
9 #include "content/browser/loader/resource_dispatcher_host_impl.h" 9 #include "content/browser/loader/resource_dispatcher_host_impl.h"
10 #include "content/browser/loader/resource_message_filter.h" 10 #include "content/browser/loader/resource_message_filter.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 bool SyncResourceHandler::OnResponseStarted( 68 bool SyncResourceHandler::OnResponseStarted(
69 ResourceResponse* response, 69 ResourceResponse* response,
70 bool* defer) { 70 bool* defer) {
71 const ResourceRequestInfoImpl* info = GetRequestInfo(); 71 const ResourceRequestInfoImpl* info = GetRequestInfo();
72 if (!info->filter()) 72 if (!info->filter())
73 return false; 73 return false;
74 74
75 if (rdh_->delegate()) { 75 if (rdh_->delegate()) {
76 rdh_->delegate()->OnResponseStarted( 76 rdh_->delegate()->OnResponseStarted(request(), info->GetContext(),
77 request(), info->GetContext(), response, info->filter()); 77 response);
78 } 78 }
79 79
80 NetLogObserver::PopulateResponseInfo(request(), response); 80 NetLogObserver::PopulateResponseInfo(request(), response);
81 81
82 // We don't care about copying the status here. 82 // We don't care about copying the status here.
83 result_.headers = response->head.headers; 83 result_.headers = response->head.headers;
84 result_.mime_type = response->head.mime_type; 84 result_.mime_type = response->head.mime_type;
85 result_.charset = response->head.charset; 85 result_.charset = response->head.charset;
86 result_.download_file_path = response->head.download_file_path; 86 result_.download_file_path = response->head.download_file_path;
87 result_.request_time = response->head.request_time; 87 result_.request_time = response->head.request_time;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 result_message_ = NULL; 133 result_message_ = NULL;
134 return; 134 return;
135 } 135 }
136 136
137 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { 137 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) {
138 // Sync requests don't involve ResourceMsg_DataDownloaded messages 138 // Sync requests don't involve ResourceMsg_DataDownloaded messages
139 // being sent back to renderers as progress is made. 139 // being sent back to renderers as progress is made.
140 } 140 }
141 141
142 } // namespace content 142 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/async_resource_handler.cc ('k') | content/public/browser/resource_dispatcher_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698