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

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

Issue 138513002: Plumb network stack information about existence of cached copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
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 <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 SyncLoadResult result; 154 SyncLoadResult result;
155 result.error_code = net::ERR_ABORTED; 155 result.error_code = net::ERR_ABORTED;
156 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result); 156 ResourceHostMsg_SyncLoad::WriteReplyParams(sync_result, result);
157 filter->Send(sync_result); 157 filter->Send(sync_result);
158 } else { 158 } else {
159 // Tell the renderer that this request was disallowed. 159 // Tell the renderer that this request was disallowed.
160 filter->Send(new ResourceMsg_RequestComplete( 160 filter->Send(new ResourceMsg_RequestComplete(
161 request_id, 161 request_id,
162 net::ERR_ABORTED, 162 net::ERR_ABORTED,
163 false, 163 false,
164 false,
164 std::string(), // No security info needed, connection not established. 165 std::string(), // No security info needed, connection not established.
165 base::TimeTicks())); 166 base::TimeTicks()));
166 } 167 }
167 } 168 }
168 169
169 void SetReferrerForRequest(net::URLRequest* request, const Referrer& referrer) { 170 void SetReferrerForRequest(net::URLRequest* request, const Referrer& referrer) {
170 if (!referrer.url.is_valid() || 171 if (!referrer.url.is_valid() ||
171 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) { 172 CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) {
172 request->SetReferrer(std::string()); 173 request->SetReferrer(std::string());
173 } else { 174 } else {
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) 1955 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
1955 && !policy->CanReadRawCookies(child_id)) { 1956 && !policy->CanReadRawCookies(child_id)) {
1956 VLOG(1) << "Denied unauthorized request for raw headers"; 1957 VLOG(1) << "Denied unauthorized request for raw headers";
1957 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; 1958 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
1958 } 1959 }
1959 1960
1960 return load_flags; 1961 return load_flags;
1961 } 1962 }
1962 1963
1963 } // namespace content 1964 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698