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

Unified Diff: chrome/browser/automation/url_request_automation_job.cc

Issue 195054: Supressing the referrer header in the automation url request job when going f... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/url_request_automation_job.cc
===================================================================
--- chrome/browser/automation/url_request_automation_job.cc (revision 25857)
+++ chrome/browser/automation/url_request_automation_job.cc (working copy)
@@ -320,6 +320,16 @@
DLOG(INFO) << "URLRequestAutomationJob: " <<
request_->url().spec() << " - request end. Status: " << status.status();
+ // TODO(tommi): When we hit certificate errors, notify the delegate via
+ // OnSSLCertificateError(). Right now we don't have the certificate
+ // so we don't. We could possibly call OnSSLCertificateError with a NULL
+ // certificate, but I'm not sure if all implementations expect it.
+ // if (status.status() == URLRequestStatus::FAILED &&
+ // net::IsCertificateError(status.os_error()) && request_->delegate()) {
+ // request_->delegate()->OnSSLCertificateError(request_, status.os_error(),
+ // NULL);
+ // }
+
DisconnectFromMessageFilter();
NotifyDone(status);
@@ -371,13 +381,14 @@
// Ensure that we do not send username and password fields in the referrer.
GURL referrer(request_->GetSanitizedReferrer());
-#ifndef NDEBUG
- // The referrer header should be suppressed if the preceding URL was
+
+ // The referrer header must be suppressed if the preceding URL was
// a secure one and the new one is not.
if (referrer.SchemeIsSecure() && !request_->url().SchemeIsSecure()) {
- DCHECK(referrer.spec().empty());
+ DLOG(INFO) <<
+ "Suppressing referrer header since going from secure to non-secure";
+ referrer = GURL();
}
-#endif
// Ask automation to start this request.
IPC::AutomationURLRequest automation_request = {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698