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

Side by Side Diff: content/renderer/pepper/url_request_info_util.cc

Issue 135973009: Don't try to guess the referrer policy, but use the one associated with the request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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
« no previous file with comments | « content/renderer/internal_document_state_data.cc ('k') | content/renderer/render_frame_impl.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 #include "content/renderer/pepper/url_request_info_util.h" 5 #include "content/renderer/pepper/url_request_info_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "content/common/fileapi/file_system_messages.h" 9 #include "content/common/fileapi/file_system_messages.h"
10 #include "content/renderer/pepper/common.h" 10 #include "content/renderer/pepper/common.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (data->has_custom_content_transfer_encoding && 170 if (data->has_custom_content_transfer_encoding &&
171 !data->custom_content_transfer_encoding.empty()) { 171 !data->custom_content_transfer_encoding.empty()) {
172 dest->addHTTPHeaderField( 172 dest->addHTTPHeaderField(
173 WebString::fromUTF8("Content-Transfer-Encoding"), 173 WebString::fromUTF8("Content-Transfer-Encoding"),
174 WebString::fromUTF8(data->custom_content_transfer_encoding)); 174 WebString::fromUTF8(data->custom_content_transfer_encoding));
175 } 175 }
176 176
177 if (data->has_custom_user_agent) { 177 if (data->has_custom_user_agent) {
178 bool was_after_preconnect_request = false; 178 bool was_after_preconnect_request = false;
179 dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl( 179 dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl(
180 frame->document().referrerPolicy(),
181 WebString::fromUTF8(data->custom_user_agent), 180 WebString::fromUTF8(data->custom_user_agent),
182 was_after_preconnect_request)); 181 was_after_preconnect_request));
183 } 182 }
184 183
185 return true; 184 return true;
186 } 185 }
187 186
188 bool URLRequestRequiresUniversalAccess(const URLRequestInfoData& data) { 187 bool URLRequestRequiresUniversalAccess(const URLRequestInfoData& data) {
189 return 188 return
190 data.has_custom_referrer_url || 189 data.has_custom_referrer_url ||
191 data.has_custom_content_transfer_encoding || 190 data.has_custom_content_transfer_encoding ||
192 data.has_custom_user_agent || 191 data.has_custom_user_agent ||
193 url_util::FindAndCompareScheme(data.url, "javascript", NULL); 192 url_util::FindAndCompareScheme(data.url, "javascript", NULL);
194 } 193 }
195 194
196 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/internal_document_state_data.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698