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

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

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 "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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 ScopedVector<content::ResourceThrottle>* throttles) { 429 ScopedVector<content::ResourceThrottle>* throttles) {
430 BrowserThread::PostTask( 430 BrowserThread::PostTask(
431 BrowserThread::UI, FROM_HERE, 431 BrowserThread::UI, FROM_HERE,
432 base::Bind(&NotifyDownloadInitiatedOnUI, child_id, route_id)); 432 base::Bind(&NotifyDownloadInitiatedOnUI, child_id, route_id));
433 433
434 // If it's from the web, we don't trust it, so we push the throttle on. 434 // If it's from the web, we don't trust it, so we push the throttle on.
435 if (is_content_initiated) { 435 if (is_content_initiated) {
436 throttles->push_back(new DownloadResourceThrottle( 436 throttles->push_back(new DownloadResourceThrottle(
437 download_request_limiter_, child_id, route_id, request->url(), 437 download_request_limiter_, child_id, route_id, request->url(),
438 request->method())); 438 request->method()));
439 #if defined(OS_ANDROID) 439 #if defined(OS_ANDROID) && !defined(USE_AURA)
440 throttles->push_back( 440 throttles->push_back(
441 new chrome::InterceptDownloadResourceThrottle( 441 new chrome::InterceptDownloadResourceThrottle(
442 request, child_id, route_id, request_id)); 442 request, child_id, route_id, request_id));
443 #endif 443 #endif
444 } 444 }
445 445
446 // If this isn't a new request, we've seen this before and added the standard 446 // If this isn't a new request, we've seen this before and added the standard
447 // resource throttles already so no need to add it again. 447 // resource throttles already so no need to add it again.
448 if (!request->is_pending()) { 448 if (!request->is_pending()) {
449 AppendStandardResourceThrottles(request, 449 AppendStandardResourceThrottles(request,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 url_request->GetTotalReceivedBytes())); 735 url_request->GetTotalReceivedBytes()));
736 } 736 }
737 } 737 }
738 738
739 // static 739 // static
740 void ChromeResourceDispatcherHostDelegate:: 740 void ChromeResourceDispatcherHostDelegate::
741 SetExternalProtocolHandlerDelegateForTesting( 741 SetExternalProtocolHandlerDelegateForTesting(
742 ExternalProtocolHandler::Delegate* delegate) { 742 ExternalProtocolHandler::Delegate* delegate) {
743 g_external_protocol_handler_delegate = delegate; 743 g_external_protocol_handler_delegate = delegate;
744 } 744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698