Chromium Code Reviews| Index: chrome/browser/net/certificate_error_reporter.cc |
| diff --git a/chrome/browser/net/certificate_error_reporter.cc b/chrome/browser/net/certificate_error_reporter.cc |
| index 57e737fce6d530e8c87fdbab7736527ab0d8a418..8d35f5b10c66c457a09c735021fe8f348db4e62a 100644 |
| --- a/chrome/browser/net/certificate_error_reporter.cc |
| +++ b/chrome/browser/net/certificate_error_reporter.cc |
| @@ -22,8 +22,11 @@ namespace chrome_browser_net { |
| CertificateErrorReporter::CertificateErrorReporter( |
| net::URLRequestContext* request_context, |
| - const GURL& upload_url) |
| - : request_context_(request_context), upload_url_(upload_url) { |
| + const GURL& upload_url, |
| + CookiesPreference cookies_preference) |
| + : request_context_(request_context), |
| + upload_url_(upload_url), |
| + cookies_preference_(cookies_preference) { |
| DCHECK(!upload_url.is_empty()); |
| } |
| @@ -47,8 +50,7 @@ void CertificateErrorReporter::SendReport(ReportType type, |
| // TODO(estark): Double-check that the user is opted in. |
| // TODO(estark): Temporarily, since this is no upload endpoint, just |
| // log the information. |
| - request.SerializeToString(&out); |
| - DVLOG(3) << "SSL report for " << hostname << ":\n" << out << "\n\n"; |
| + DVLOG(1) << "Would send certificate report for " << hostname; |
| break; |
| default: |
| NOTREACHED(); |
| @@ -76,8 +78,10 @@ scoped_ptr<net::URLRequest> CertificateErrorReporter::CreateURLRequest( |
| net::URLRequestContext* context) { |
| scoped_ptr<net::URLRequest> request = |
| context->CreateRequest(upload_url_, net::DEFAULT_PRIORITY, this, NULL); |
| - request->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | |
| - net::LOAD_DO_NOT_SAVE_COOKIES); |
| + if (cookies_preference_ != SEND_COOKIES) { |
| + request->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | |
| + net::LOAD_DO_NOT_SAVE_COOKIES); |
| + } |
|
Ryan Sleevi
2015/03/25 04:49:45
You haven't added code to test this
(Edit: I see
estark
2015/03/25 05:34:33
Do I get bonus points for delivering both?
(crbug
|
| return request.Pass(); |
| } |