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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/tld_cleanup/tld_cleanup.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 26890640f2196669cb4b7e292e3a6436ea53032a..7728f6c606cbf6096c2bc67621cd49d45ccc7aaa 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -42,7 +42,7 @@ URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request,
// We cache the value of the switch because this code path is hit on every
// network request.
static const bool kForceHTTPS =
- CommandLine().HasSwitch(switches::kForceHTTPS);
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceHTTPS);
if (kForceHTTPS && scheme != "https")
return new URLRequestErrorJob(request, net::ERR_DISALLOWED_URL_SCHEME);
@@ -385,7 +385,8 @@ void URLRequestHttpJob::OnStartCompleted(int result) {
if (result == net::OK) {
NotifyHeadersComplete();
} else if (net::IsCertificateError(result) &&
- !CommandLine().HasSwitch(switches::kForceHTTPS)) {
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kForceHTTPS)) {
// We encountered an SSL certificate error. Ask our delegate to decide
// what we should do.
// TODO(wtc): also pass ssl_info.cert_status, or just pass the whole
« no previous file with comments | « net/tools/tld_cleanup/tld_cleanup.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698