| OLD | NEW |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 std::string out; | 57 std::string out; |
| 58 request.SerializeToString(&out); | 58 request.SerializeToString(&out); |
| 59 return out; | 59 return out; |
| 60 } | 60 } |
| 61 | 61 |
| 62 scoped_ptr<net::URLRequest> | 62 scoped_ptr<net::URLRequest> |
| 63 ChromeFraudulentCertificateReporter::CreateURLRequest( | 63 ChromeFraudulentCertificateReporter::CreateURLRequest( |
| 64 net::URLRequestContext* context) { | 64 net::URLRequestContext* context) { |
| 65 scoped_ptr<net::URLRequest> request = | 65 scoped_ptr<net::URLRequest> request = |
| 66 context->CreateRequest(upload_url_, net::DEFAULT_PRIORITY, this, NULL); | 66 context->CreateRequest(upload_url_, net::DEFAULT_PRIORITY, this); |
| 67 request->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | | 67 request->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | |
| 68 net::LOAD_DO_NOT_SAVE_COOKIES); | 68 net::LOAD_DO_NOT_SAVE_COOKIES); |
| 69 return request.Pass(); | 69 return request.Pass(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void ChromeFraudulentCertificateReporter::SendReport( | 72 void ChromeFraudulentCertificateReporter::SendReport( |
| 73 const std::string& hostname, | 73 const std::string& hostname, |
| 74 const net::SSLInfo& ssl_info) { | 74 const net::SSLInfo& ssl_info) { |
| 75 // We do silent/automatic reporting ONLY for Google properties. For other | 75 // We do silent/automatic reporting ONLY for Google properties. For other |
| 76 // domains (when we start supporting that), we will ask for user permission. | 76 // domains (when we start supporting that), we will ask for user permission. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 LOG(WARNING) << "Certificate upload HTTP status: " | 125 LOG(WARNING) << "Certificate upload HTTP status: " |
| 126 << request->GetResponseCode(); | 126 << request->GetResponseCode(); |
| 127 } | 127 } |
| 128 RequestComplete(request); | 128 RequestComplete(request); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ChromeFraudulentCertificateReporter::OnReadCompleted( | 131 void ChromeFraudulentCertificateReporter::OnReadCompleted( |
| 132 net::URLRequest* request, int bytes_read) {} | 132 net::URLRequest* request, int bytes_read) {} |
| 133 | 133 |
| 134 } // namespace chrome_browser_net | 134 } // namespace chrome_browser_net |
| OLD | NEW |