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

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

Issue 18601004: Add the UMA PLT.BeginToFinish{,Doc}_AfterPreconnectRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest compilation failure Created 7 years, 4 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
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/renderer/pepper/common.h" 9 #include "content/renderer/pepper/common.h"
10 #include "content/renderer/pepper/plugin_module.h" 10 #include "content/renderer/pepper/plugin_module.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 frame->setReferrerForRequest(*dest, GURL(data->custom_referrer_url)); 176 frame->setReferrerForRequest(*dest, GURL(data->custom_referrer_url));
177 177
178 if (data->has_custom_content_transfer_encoding && 178 if (data->has_custom_content_transfer_encoding &&
179 !data->custom_content_transfer_encoding.empty()) { 179 !data->custom_content_transfer_encoding.empty()) {
180 dest->addHTTPHeaderField( 180 dest->addHTTPHeaderField(
181 WebString::fromUTF8("Content-Transfer-Encoding"), 181 WebString::fromUTF8("Content-Transfer-Encoding"),
182 WebString::fromUTF8(data->custom_content_transfer_encoding)); 182 WebString::fromUTF8(data->custom_content_transfer_encoding));
183 } 183 }
184 184
185 if (data->has_custom_user_agent) { 185 if (data->has_custom_user_agent) {
186 bool was_after_preconnect_request = false;
186 dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl( 187 dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl(
187 WebKit::WebReferrerPolicyDefault, // Ignored. 188 WebKit::WebReferrerPolicyDefault, // Ignored.
188 WebString::fromUTF8(data->custom_user_agent))); 189 WebString::fromUTF8(data->custom_user_agent),
190 was_after_preconnect_request));
189 } 191 }
190 192
191 return true; 193 return true;
192 } 194 }
193 195
194 bool URLRequestRequiresUniversalAccess( 196 bool URLRequestRequiresUniversalAccess(
195 const ::ppapi::URLRequestInfoData& data) { 197 const ::ppapi::URLRequestInfoData& data) {
196 return 198 return
197 data.has_custom_referrer_url || 199 data.has_custom_referrer_url ||
198 data.has_custom_content_transfer_encoding || 200 data.has_custom_content_transfer_encoding ||
199 data.has_custom_user_agent || 201 data.has_custom_user_agent ||
200 url_util::FindAndCompareScheme(data.url, "javascript", NULL); 202 url_util::FindAndCompareScheme(data.url, "javascript", NULL);
201 } 203 }
202 204
203 } // namespace content 205 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698