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

Side by Side Diff: webkit/plugins/ppapi/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: revert unwanted change Created 7 years, 5 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 "webkit/plugins/ppapi/url_request_info_util.h" 5 #include "webkit/plugins/ppapi/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 "net/http/http_util.h" 9 #include "net/http/http_util.h"
10 #include "ppapi/shared_impl/url_request_info_data.h" 10 #include "ppapi/shared_impl/url_request_info_data.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 frame->setReferrerForRequest(*dest, GURL(data->custom_referrer_url)); 177 frame->setReferrerForRequest(*dest, GURL(data->custom_referrer_url));
178 178
179 if (data->has_custom_content_transfer_encoding && 179 if (data->has_custom_content_transfer_encoding &&
180 !data->custom_content_transfer_encoding.empty()) { 180 !data->custom_content_transfer_encoding.empty()) {
181 dest->addHTTPHeaderField( 181 dest->addHTTPHeaderField(
182 WebString::fromUTF8("Content-Transfer-Encoding"), 182 WebString::fromUTF8("Content-Transfer-Encoding"),
183 WebString::fromUTF8(data->custom_content_transfer_encoding)); 183 WebString::fromUTF8(data->custom_content_transfer_encoding));
184 } 184 }
185 185
186 if (data->has_custom_user_agent) { 186 if (data->has_custom_user_agent) {
187 bool was_after_preconnect_request = false;
187 dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl( 188 dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl(
188 WebKit::WebReferrerPolicyDefault, // Ignored. 189 WebKit::WebReferrerPolicyDefault, // Ignored.
189 WebString::fromUTF8(data->custom_user_agent))); 190 WebString::fromUTF8(data->custom_user_agent),
191 was_after_preconnect_request));
190 } 192 }
191 193
192 return true; 194 return true;
193 } 195 }
194 196
195 bool URLRequestRequiresUniversalAccess( 197 bool URLRequestRequiresUniversalAccess(
196 const ::ppapi::URLRequestInfoData& data) { 198 const ::ppapi::URLRequestInfoData& data) {
197 return 199 return
198 data.has_custom_referrer_url || 200 data.has_custom_referrer_url ||
199 data.has_custom_content_transfer_encoding || 201 data.has_custom_content_transfer_encoding ||
200 data.has_custom_user_agent || 202 data.has_custom_user_agent ||
201 url_util::FindAndCompareScheme(data.url, "javascript", NULL); 203 url_util::FindAndCompareScheme(data.url, "javascript", NULL);
202 } 204 }
203 205
204 } // namespace ppapi 206 } // namespace ppapi
205 } // namespace webkit 207 } // namespace webkit
OLDNEW
« content/renderer/render_view_impl.cc ('K') | « webkit/glue/weburlrequest_extradata_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698