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

Side by Side Diff: trunk/src/chrome/browser/net/chrome_fraudulent_certificate_reporter.cc

Issue 47563006: Revert 232802 "[Net] Assert that URLRequests with LOAD_IGNORE_LI..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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 "chrome/browser/net/chrome_fraudulent_certificate_reporter.h" 5 #include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 std::string out; 54 std::string out;
55 request.SerializeToString(&out); 55 request.SerializeToString(&out);
56 return out; 56 return out;
57 } 57 }
58 58
59 scoped_ptr<net::URLRequest> 59 scoped_ptr<net::URLRequest>
60 ChromeFraudulentCertificateReporter::CreateURLRequest( 60 ChromeFraudulentCertificateReporter::CreateURLRequest(
61 net::URLRequestContext* context) { 61 net::URLRequestContext* context) {
62 scoped_ptr<net::URLRequest> request = 62 scoped_ptr<net::URLRequest> request =
63 context->CreateRequest(upload_url_, net::DEFAULT_PRIORITY, this); 63 context->CreateRequest(upload_url_, net::DEFAULT_PRIORITY, this);
64 request->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | 64 request->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
65 net::LOAD_DO_NOT_SAVE_COOKIES); 65 net::LOAD_DO_NOT_SAVE_COOKIES);
66 return request.Pass(); 66 return request.Pass();
67 } 67 }
68 68
69 void ChromeFraudulentCertificateReporter::SendReport( 69 void ChromeFraudulentCertificateReporter::SendReport(
70 const std::string& hostname, 70 const std::string& hostname,
71 const net::SSLInfo& ssl_info, 71 const net::SSLInfo& ssl_info,
72 bool sni_available) { 72 bool sni_available) {
73 // We do silent/automatic reporting ONLY for Google properties. For other 73 // We do silent/automatic reporting ONLY for Google properties. For other
74 // domains (when we start supporting that), we will ask for user permission. 74 // domains (when we start supporting that), we will ask for user permission.
75 if (!net::TransportSecurityState::IsGooglePinnedProperty(hostname, 75 if (!net::TransportSecurityState::IsGooglePinnedProperty(hostname,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 LOG(WARNING) << "Certificate upload HTTP status: " 119 LOG(WARNING) << "Certificate upload HTTP status: "
120 << request->GetResponseCode(); 120 << request->GetResponseCode();
121 } 121 }
122 RequestComplete(request); 122 RequestComplete(request);
123 } 123 }
124 124
125 void ChromeFraudulentCertificateReporter::OnReadCompleted( 125 void ChromeFraudulentCertificateReporter::OnReadCompleted(
126 net::URLRequest* request, int bytes_read) {} 126 net::URLRequest* request, int bytes_read) {}
127 127
128 } // namespace chrome_browser_net 128 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698