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

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

Issue 10870060: Removed calls to URLRequest::URLRequest in favor of URLRequestContext::CreateRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/connection_tester.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 for (size_t i = 0; i < pem_encoded_chain.size(); ++i) 49 for (size_t i = 0; i < pem_encoded_chain.size(); ++i)
50 *cert_chain += pem_encoded_chain[i]; 50 *cert_chain += pem_encoded_chain[i];
51 51
52 std::string out; 52 std::string out;
53 request.SerializeToString(&out); 53 request.SerializeToString(&out);
54 return out; 54 return out;
55 } 55 }
56 56
57 net::URLRequest* ChromeFraudulentCertificateReporter::CreateURLRequest( 57 net::URLRequest* ChromeFraudulentCertificateReporter::CreateURLRequest(
58 net::URLRequestContext* context) { 58 net::URLRequestContext* context) {
59 net::URLRequest* request = new net::URLRequest(upload_url_, this, context); 59 net::URLRequest* request = context->CreateRequest(upload_url_, this);
60 request->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | 60 request->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
61 net::LOAD_DO_NOT_SAVE_COOKIES); 61 net::LOAD_DO_NOT_SAVE_COOKIES);
62 return request; 62 return request;
63 } 63 }
64 64
65 void ChromeFraudulentCertificateReporter::SendReport( 65 void ChromeFraudulentCertificateReporter::SendReport(
66 const std::string& hostname, 66 const std::string& hostname,
67 const net::SSLInfo& ssl_info, 67 const net::SSLInfo& ssl_info,
68 bool sni_available) { 68 bool sni_available) {
69 // We do silent/automatic reporting ONLY for Google properties. For other 69 // We do silent/automatic reporting ONLY for Google properties. For other
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 << request->GetResponseCode(); 111 << request->GetResponseCode();
112 } 112 }
113 RequestComplete(request); 113 RequestComplete(request);
114 } 114 }
115 115
116 void ChromeFraudulentCertificateReporter::OnReadCompleted( 116 void ChromeFraudulentCertificateReporter::OnReadCompleted(
117 net::URLRequest* request, int bytes_read) {} 117 net::URLRequest* request, int bytes_read) {}
118 118
119 } // namespace chrome_browser_net 119 } // namespace chrome_browser_net
120 120
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/connection_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698