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

Side by Side Diff: android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.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 "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h" 5 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "android_webview/browser/aw_contents_io_thread_client.h" 10 #include "android_webview/browser/aw_contents_io_thread_client.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 content::ResourceContext* resource_context) { 320 content::ResourceContext* resource_context) {
321 // The AwURLRequestJobFactory implementation should ensure this method never 321 // The AwURLRequestJobFactory implementation should ensure this method never
322 // gets called. 322 // gets called.
323 NOTREACHED(); 323 NOTREACHED();
324 return false; 324 return false;
325 } 325 }
326 326
327 void AwResourceDispatcherHostDelegate::OnResponseStarted( 327 void AwResourceDispatcherHostDelegate::OnResponseStarted(
328 net::URLRequest* request, 328 net::URLRequest* request,
329 content::ResourceContext* resource_context, 329 content::ResourceContext* resource_context,
330 content::ResourceResponse* response, 330 content::ResourceResponse* response) {
331 IPC::Sender* sender) {
332 const content::ResourceRequestInfo* request_info = 331 const content::ResourceRequestInfo* request_info =
333 content::ResourceRequestInfo::ForRequest(request); 332 content::ResourceRequestInfo::ForRequest(request);
334 if (!request_info) { 333 if (!request_info) {
335 DLOG(FATAL) << "Started request without associated info: " << 334 DLOG(FATAL) << "Started request without associated info: " <<
336 request->url(); 335 request->url();
337 return; 336 return;
338 } 337 }
339 338
340 if (request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) { 339 if (request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) {
341 // Check for x-auto-login header. 340 // Check for x-auto-login header.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 net::HttpRequestHeaders headers; 437 net::HttpRequestHeaders headers;
439 headers.AddHeadersFromString(extra_headers); 438 headers.AddHeadersFromString(extra_headers);
440 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { 439 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) {
441 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); 440 request->SetExtraRequestHeaderByName(it.name(), it.value(), false);
442 } 441 }
443 } 442 }
444 } 443 }
445 } 444 }
446 445
447 } // namespace android_webview 446 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698