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 <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 | 786 |
787 if (!IsResourceTypeFrame(info->GetResourceType())) | 787 if (!IsResourceTypeFrame(info->GetResourceType())) |
788 return false; | 788 return false; |
789 | 789 |
790 const net::URLRequestJobFactory* job_factory = | 790 const net::URLRequestJobFactory* job_factory = |
791 info->GetContext()->GetRequestContext()->job_factory(); | 791 info->GetContext()->GetRequestContext()->job_factory(); |
792 if (job_factory->IsHandledURL(url)) | 792 if (job_factory->IsHandledURL(url)) |
793 return false; | 793 return false; |
794 | 794 |
795 return delegate_->HandleExternalProtocol( | 795 return delegate_->HandleExternalProtocol( |
796 url, info->GetChildID(), info->GetRouteID()); | 796 url, info->GetChildID(), info->GetRouteID(), info->IsMainFrame(), |
| 797 info->GetPageTransition(), info->HasUserGesture()); |
797 } | 798 } |
798 | 799 |
799 void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) { | 800 void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) { |
800 // Make sure we have the load state monitor running | 801 // Make sure we have the load state monitor running |
801 if (!update_load_states_timer_->IsRunning()) { | 802 if (!update_load_states_timer_->IsRunning()) { |
802 update_load_states_timer_->Start( | 803 update_load_states_timer_->Start( |
803 FROM_HERE, TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec), | 804 FROM_HERE, TimeDelta::FromMilliseconds(kUpdateLoadStatesIntervalMsec), |
804 this, &ResourceDispatcherHostImpl::UpdateLoadInfo); | 805 this, &ResourceDispatcherHostImpl::UpdateLoadInfo); |
805 } | 806 } |
806 } | 807 } |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 | 2345 |
2345 // Add a flag to selectively bypass the data reduction proxy if the resource | 2346 // Add a flag to selectively bypass the data reduction proxy if the resource |
2346 // type is not an image. | 2347 // type is not an image. |
2347 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2348 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
2348 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2349 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
2349 | 2350 |
2350 return load_flags; | 2351 return load_flags; |
2351 } | 2352 } |
2352 | 2353 |
2353 } // namespace content | 2354 } // namespace content |
OLD | NEW |