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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 BrowserThread::PostTask( | 697 BrowserThread::PostTask( |
698 BrowserThread::UI, FROM_HERE, | 698 BrowserThread::UI, FROM_HERE, |
699 base::Bind( | 699 base::Bind( |
700 &NotifyRedirectOnUI, | 700 &NotifyRedirectOnUI, |
701 render_process_id, render_frame_host, base::Passed(&detail))); | 701 render_process_id, render_frame_host, base::Passed(&detail))); |
702 } | 702 } |
703 | 703 |
704 void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) { | 704 void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) { |
705 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); | 705 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); |
706 | 706 |
| 707 if (loader->request()->was_fetched_via_proxy() && |
| 708 loader->request()->was_fetched_via_spdy() && |
| 709 loader->request()->url().SchemeIs("http")) { |
| 710 scheduler_->OnReceivedSpdyProxiedHttpResponse( |
| 711 info->GetChildID(), info->GetRouteID()); |
| 712 } |
| 713 |
707 // There should be an entry in the map created when we dispatched the | 714 // There should be an entry in the map created when we dispatched the |
708 // request unless it's been detached and the renderer has died. | 715 // request unless it's been detached and the renderer has died. |
709 OfflineMap::iterator policy_it( | 716 OfflineMap::iterator policy_it( |
710 offline_policy_map_.find(info->GetGlobalRoutingID())); | 717 offline_policy_map_.find(info->GetGlobalRoutingID())); |
711 if (offline_policy_map_.end() != policy_it) { | 718 if (offline_policy_map_.end() != policy_it) { |
712 policy_it->second->UpdateStateForSuccessfullyStartedRequest( | 719 policy_it->second->UpdateStateForSuccessfullyStartedRequest( |
713 loader->request()->response_info()); | 720 loader->request()->response_info()); |
714 } else { | 721 } else { |
715 // Unless detached, we should have an entry in offline_policy_map_ from | 722 // Unless detached, we should have an entry in offline_policy_map_ from |
716 // when this request traversed Begin{Download,SaveFile,Request}. | 723 // when this request traversed Begin{Download,SaveFile,Request}. |
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) | 1961 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) |
1955 && !policy->CanReadRawCookies(child_id)) { | 1962 && !policy->CanReadRawCookies(child_id)) { |
1956 VLOG(1) << "Denied unauthorized request for raw headers"; | 1963 VLOG(1) << "Denied unauthorized request for raw headers"; |
1957 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; | 1964 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; |
1958 } | 1965 } |
1959 | 1966 |
1960 return load_flags; | 1967 return load_flags; |
1961 } | 1968 } |
1962 | 1969 |
1963 } // namespace content | 1970 } // namespace content |
OLD | NEW |