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

Side by Side Diff: components/certificate_reporting/error_reporter.cc

Issue 2851493003: Remove unused CookiePreferences from report sender and never send cookies (Closed)
Patch Set: Fix rebase Created 3 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/certificate_reporting/error_reporter.h" 5 #include "components/certificate_reporting/error_reporter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 encrypted_report->set_server_public_key_version(server_public_key_version); 93 encrypted_report->set_server_public_key_version(server_public_key_version);
94 encrypted_report->set_client_public_key(reinterpret_cast<char*>(public_key), 94 encrypted_report->set_client_public_key(reinterpret_cast<char*>(public_key),
95 sizeof(public_key)); 95 sizeof(public_key));
96 encrypted_report->set_algorithm( 96 encrypted_report->set_algorithm(
97 EncryptedCertLoggerRequest::AEAD_ECDH_AES_128_CTR_HMAC_SHA256); 97 EncryptedCertLoggerRequest::AEAD_ECDH_AES_128_CTR_HMAC_SHA256);
98 return true; 98 return true;
99 } 99 }
100 100
101 } // namespace 101 } // namespace
102 102
103 ErrorReporter::ErrorReporter( 103 ErrorReporter::ErrorReporter(net::URLRequestContext* request_context,
104 net::URLRequestContext* request_context, 104 const GURL& upload_url)
105 const GURL& upload_url,
106 net::ReportSender::CookiesPreference cookies_preference)
107 : ErrorReporter(upload_url, 105 : ErrorReporter(upload_url,
108 kServerPublicKey, 106 kServerPublicKey,
109 kServerPublicKeyVersion, 107 kServerPublicKeyVersion,
110 base::MakeUnique<net::ReportSender>(request_context, 108 base::MakeUnique<net::ReportSender>(request_context)) {}
111 cookies_preference)) {}
112 109
113 ErrorReporter::ErrorReporter( 110 ErrorReporter::ErrorReporter(
114 const GURL& upload_url, 111 const GURL& upload_url,
115 const uint8_t server_public_key[/* 32 */], 112 const uint8_t server_public_key[/* 32 */],
116 const uint32_t server_public_key_version, 113 const uint32_t server_public_key_version,
117 std::unique_ptr<net::ReportSender> certificate_report_sender) 114 std::unique_ptr<net::ReportSender> certificate_report_sender)
118 : certificate_report_sender_(std::move(certificate_report_sender)), 115 : certificate_report_sender_(std::move(certificate_report_sender)),
119 upload_url_(upload_url), 116 upload_url_(upload_url),
120 server_public_key_(server_public_key), 117 server_public_key_(server_public_key),
121 server_public_key_version_(server_public_key_version) { 118 server_public_key_version_(server_public_key_version) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 aead.Init(&key); 162 aead.Init(&key);
166 163
167 // Use an all-zero nonce because the key is random per-message. 164 // Use an all-zero nonce because the key is random per-message.
168 std::string nonce(aead.NonceLength(), 0); 165 std::string nonce(aead.NonceLength(), 0);
169 166
170 return aead.Open(encrypted_report.encrypted_report(), nonce, std::string(), 167 return aead.Open(encrypted_report.encrypted_report(), nonce, std::string(),
171 decrypted_serialized_report); 168 decrypted_serialized_report);
172 } 169 }
173 170
174 } // namespace certificate_reporting 171 } // namespace certificate_reporting
OLDNEW
« no previous file with comments | « components/certificate_reporting/error_reporter.h ('k') | components/certificate_reporting/error_reporter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698