OLD | NEW |
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 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 if (throttle) | 462 if (throttle) |
463 throttles->push_back(throttle); | 463 throttles->push_back(throttle); |
464 | 464 |
465 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); | 465 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); |
466 if (prerender_tracker_->IsPrerenderingOnIOThread(info->GetChildID(), | 466 if (prerender_tracker_->IsPrerenderingOnIOThread(info->GetChildID(), |
467 info->GetRouteID())) { | 467 info->GetRouteID())) { |
468 throttles->push_back(new prerender::PrerenderResourceThrottle( | 468 throttles->push_back(new prerender::PrerenderResourceThrottle( |
469 request, prerender_tracker_)); | 469 request, prerender_tracker_)); |
470 } | 470 } |
471 if (prerender_tracker_->IsPendingSwapRequestOnIOThread( | 471 if (prerender_tracker_->IsPendingSwapRequestOnIOThread( |
472 info->GetChildID(), info->GetRouteID(), request->url())) { | 472 info->GetChildID(), info->GetRenderFrameID(), request->url())) { |
473 throttles->push_back(new prerender::PrerenderPendingSwapThrottle( | 473 throttles->push_back(new prerender::PrerenderPendingSwapThrottle( |
474 request, prerender_tracker_)); | 474 request, prerender_tracker_)); |
475 } | 475 } |
476 } | 476 } |
477 | 477 |
478 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 478 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
479 void ChromeResourceDispatcherHostDelegate::AppendChromeSyncGaiaHeader( | 479 void ChromeResourceDispatcherHostDelegate::AppendChromeSyncGaiaHeader( |
480 net::URLRequest* request, | 480 net::URLRequest* request, |
481 content::ResourceContext* resource_context) { | 481 content::ResourceContext* resource_context) { |
482 static const char kAllowChromeSignIn[] = "Allow-Chrome-SignIn"; | 482 static const char kAllowChromeSignIn[] = "Allow-Chrome-SignIn"; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data, | 627 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data, |
628 info->GetChildID(), info->GetRouteID()); | 628 info->GetChildID(), info->GetRouteID()); |
629 } | 629 } |
630 | 630 |
631 // static | 631 // static |
632 void ChromeResourceDispatcherHostDelegate:: | 632 void ChromeResourceDispatcherHostDelegate:: |
633 SetExternalProtocolHandlerDelegateForTesting( | 633 SetExternalProtocolHandlerDelegateForTesting( |
634 ExternalProtocolHandler::Delegate* delegate) { | 634 ExternalProtocolHandler::Delegate* delegate) { |
635 g_external_protocol_handler_delegate = delegate; | 635 g_external_protocol_handler_delegate = delegate; |
636 } | 636 } |
OLD | NEW |