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

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

Issue 2902893003: Annotation unique id updated in error_reporter.cc. (Closed)
Patch Set: Annotation unique id updated. Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_encrypted_report(ciphertext); 93 encrypted_report->set_encrypted_report(ciphertext);
94 encrypted_report->set_server_public_key_version(server_public_key_version); 94 encrypted_report->set_server_public_key_version(server_public_key_version);
95 encrypted_report->set_client_public_key(reinterpret_cast<char*>(public_key), 95 encrypted_report->set_client_public_key(reinterpret_cast<char*>(public_key),
96 sizeof(public_key)); 96 sizeof(public_key));
97 encrypted_report->set_algorithm( 97 encrypted_report->set_algorithm(
98 EncryptedCertLoggerRequest::AEAD_ECDH_AES_128_CTR_HMAC_SHA256); 98 EncryptedCertLoggerRequest::AEAD_ECDH_AES_128_CTR_HMAC_SHA256);
99 return true; 99 return true;
100 } 100 }
101 101
102 constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = 102 constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
103 net::DefineNetworkTrafficAnnotation("safe_browsing_extended_reporting", R"( 103 net::DefineNetworkTrafficAnnotation(
104 "safe_browsing_certificate_error_reporting",
105 R"(
104 semantics { 106 semantics {
105 sender: "Safe Browsing Extended Reporting" 107 sender: "Safe Browsing Extended Reporting"
106 description: 108 description:
107 "When a user has opted in to Safe Browsing Extended Reporting, " 109 "When a user has opted in to Safe Browsing Extended Reporting, "
108 "Chrome will send information about HTTPS certificate errors that " 110 "Chrome will send information about HTTPS certificate errors that "
109 "the user encounters to Google. This information includes the " 111 "the user encounters to Google. This information includes the "
110 "certificate chain and the type of error encountered. The " 112 "certificate chain and the type of error encountered. The "
111 "information is used to understand and mitigate common causes of " 113 "information is used to understand and mitigate common causes of "
112 "spurious certificate errors." 114 "spurious certificate errors."
113 trigger: 115 trigger:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 aead.Init(&key); 201 aead.Init(&key);
200 202
201 // Use an all-zero nonce because the key is random per-message. 203 // Use an all-zero nonce because the key is random per-message.
202 std::string nonce(aead.NonceLength(), 0); 204 std::string nonce(aead.NonceLength(), 0);
203 205
204 return aead.Open(encrypted_report.encrypted_report(), nonce, std::string(), 206 return aead.Open(encrypted_report.encrypted_report(), nonce, std::string(),
205 decrypted_serialized_report); 207 decrypted_serialized_report);
206 } 208 }
207 209
208 } // namespace certificate_reporting 210 } // namespace certificate_reporting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698