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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 598453004: Replace some hard coded schemes with the constants in /url/url_constants.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the comment. Created 6 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
« no previous file with comments | « no previous file | content/browser/loader/resource_scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 base::Bind( 738 base::Bind(
739 &NotifyRedirectOnUI, 739 &NotifyRedirectOnUI,
740 render_process_id, render_frame_host, base::Passed(&detail))); 740 render_process_id, render_frame_host, base::Passed(&detail)));
741 } 741 }
742 742
743 void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) { 743 void ResourceDispatcherHostImpl::DidReceiveResponse(ResourceLoader* loader) {
744 ResourceRequestInfoImpl* info = loader->GetRequestInfo(); 744 ResourceRequestInfoImpl* info = loader->GetRequestInfo();
745 745
746 if (loader->request()->was_fetched_via_proxy() && 746 if (loader->request()->was_fetched_via_proxy() &&
747 loader->request()->was_fetched_via_spdy() && 747 loader->request()->was_fetched_via_spdy() &&
748 loader->request()->url().SchemeIs("http")) { 748 loader->request()->url().SchemeIs(url::kHttpScheme)) {
749 scheduler_->OnReceivedSpdyProxiedHttpResponse( 749 scheduler_->OnReceivedSpdyProxiedHttpResponse(
750 info->GetChildID(), info->GetRouteID()); 750 info->GetChildID(), info->GetRouteID());
751 } 751 }
752 752
753 int render_process_id, render_frame_host; 753 int render_process_id, render_frame_host;
754 if (!info->GetAssociatedRenderFrame(&render_process_id, &render_frame_host)) 754 if (!info->GetAssociatedRenderFrame(&render_process_id, &render_frame_host))
755 return; 755 return;
756 756
757 // Notify the observers on the UI thread. 757 // Notify the observers on the UI thread.
758 scoped_ptr<ResourceRequestDetails> detail(new ResourceRequestDetails( 758 scoped_ptr<ResourceRequestDetails> detail(new ResourceRequestDetails(
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 2049
2050 // Add a flag to selectively bypass the data reduction proxy if the resource 2050 // Add a flag to selectively bypass the data reduction proxy if the resource
2051 // type is not an image. 2051 // type is not an image.
2052 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2052 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2053 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2053 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2054 2054
2055 return load_flags; 2055 return load_flags;
2056 } 2056 }
2057 2057
2058 } // namespace content 2058 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/resource_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698