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

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

Issue 2140523002: Remove WebURLRequest::initialize() and simplify WebURLRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mutable ref Created 4 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 "content/renderer/pepper/url_request_info_util.h" 5 #include "content/renderer/pepper/url_request_info_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 HostGlobals::Get()->GetInstance(instance); 162 HostGlobals::Get()->GetInstance(instance);
163 if (instance_impl) { 163 if (instance_impl) {
164 name_version = MakeXRequestedWithValue( 164 name_version = MakeXRequestedWithValue(
165 instance_impl->module()->name(), 165 instance_impl->module()->name(),
166 instance_impl->module()->version()); 166 instance_impl->module()->version());
167 } 167 }
168 } else { 168 } else {
169 name_version = "internal_testing_only"; 169 name_version = "internal_testing_only";
170 } 170 }
171 171
172 dest->initialize();
173 dest->setURL(frame->document().completeURL(WebString::fromUTF8(data->url))); 172 dest->setURL(frame->document().completeURL(WebString::fromUTF8(data->url)));
174 dest->setDownloadToFile(data->stream_to_file); 173 dest->setDownloadToFile(data->stream_to_file);
175 dest->setReportUploadProgress(data->record_upload_progress); 174 dest->setReportUploadProgress(data->record_upload_progress);
176 175
177 if (!data->method.empty()) 176 if (!data->method.empty())
178 dest->setHTTPMethod(WebString::fromUTF8(data->method)); 177 dest->setHTTPMethod(WebString::fromUTF8(data->method));
179 178
180 dest->setFirstPartyForCookies(frame->document().firstPartyForCookies()); 179 dest->setFirstPartyForCookies(frame->document().firstPartyForCookies());
181 180
182 const std::string& headers = data->headers; 181 const std::string& headers = data->headers;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 240 }
242 241
243 bool URLRequestRequiresUniversalAccess(const URLRequestInfoData& data) { 242 bool URLRequestRequiresUniversalAccess(const URLRequestInfoData& data) {
244 return data.has_custom_referrer_url || 243 return data.has_custom_referrer_url ||
245 data.has_custom_content_transfer_encoding || 244 data.has_custom_content_transfer_encoding ||
246 data.has_custom_user_agent || 245 data.has_custom_user_agent ||
247 url::FindAndCompareScheme(data.url, url::kJavaScriptScheme, NULL); 246 url::FindAndCompareScheme(data.url, url::kJavaScriptScheme, NULL);
248 } 247 }
249 248
250 } // namespace content 249 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/fetchers/resource_fetcher_impl.cc ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698