| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 ix->second.view_id, embedded)); | 623 ix->second.view_id, embedded)); |
| 624 stream_target_info_.erase(request); | 624 stream_target_info_.erase(request); |
| 625 #endif | 625 #endif |
| 626 } | 626 } |
| 627 | 627 |
| 628 void ChromeResourceDispatcherHostDelegate::OnResponseStarted( | 628 void ChromeResourceDispatcherHostDelegate::OnResponseStarted( |
| 629 net::URLRequest* request, | 629 net::URLRequest* request, |
| 630 content::ResourceContext* resource_context, | 630 content::ResourceContext* resource_context, |
| 631 content::ResourceResponse* response, | 631 content::ResourceResponse* response, |
| 632 IPC::Sender* sender) { | 632 IPC::Sender* sender) { |
| 633 TRACE_EVENT0("toplevel", |
| 634 "ChromeResourceDispatcherHostDelegate::OnResponseStarted"); |
| 633 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); | 635 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); |
| 634 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); | 636 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); |
| 635 | 637 |
| 636 // See if the response contains the X-Chrome-Manage-Accounts header. If so | 638 // See if the response contains the X-Chrome-Manage-Accounts header. If so |
| 637 // show the profile avatar bubble so that user can complete signin/out action | 639 // show the profile avatar bubble so that user can complete signin/out action |
| 638 // the native UI. | 640 // the native UI. |
| 639 signin::ProcessMirrorResponseHeaderIfExists(request, io_data, | 641 signin::ProcessMirrorResponseHeaderIfExists(request, io_data, |
| 640 info->GetChildID(), | 642 info->GetChildID(), |
| 641 info->GetRouteID()); | 643 info->GetRouteID()); |
| 642 | 644 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request); | 731 return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request); |
| 730 return false; | 732 return false; |
| 731 } | 733 } |
| 732 | 734 |
| 733 // static | 735 // static |
| 734 void ChromeResourceDispatcherHostDelegate:: | 736 void ChromeResourceDispatcherHostDelegate:: |
| 735 SetExternalProtocolHandlerDelegateForTesting( | 737 SetExternalProtocolHandlerDelegateForTesting( |
| 736 ExternalProtocolHandler::Delegate* delegate) { | 738 ExternalProtocolHandler::Delegate* delegate) { |
| 737 g_external_protocol_handler_delegate = delegate; | 739 g_external_protocol_handler_delegate = delegate; |
| 738 } | 740 } |
| OLD | NEW |