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

Side by Side Diff: chrome/browser/safe_browsing/certificate_reporting_service.h

Issue 2648713002: Add response code to the success callback of ReportSender (Closed)
Patch Set: Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // provided in the constructor. Failed reports will be added to the retry 117 // provided in the constructor. Failed reports will be added to the retry
118 // list. 118 // list.
119 void SendPending(); 119 void SendPending();
120 120
121 // Getter and setters for testing: 121 // Getter and setters for testing:
122 size_t inflight_report_count_for_testing() const; 122 size_t inflight_report_count_for_testing() const;
123 BoundedReportList* GetQueueForTesting() const; 123 BoundedReportList* GetQueueForTesting() const;
124 124
125 private: 125 private:
126 void SendInternal(const Report& report); 126 void SendInternal(const Report& report);
127 void ErrorCallback(int report_id, const GURL& url, int error); 127 void ErrorCallback(int report_id,
128 void SuccessCallback(int report_id); 128 const GURL& url,
129 int error,
130 int response_code);
131 void SuccessCallback(int report_id, int response_code);
129 132
130 std::unique_ptr<certificate_reporting::ErrorReporter> error_reporter_; 133 std::unique_ptr<certificate_reporting::ErrorReporter> error_reporter_;
131 std::unique_ptr<BoundedReportList> retry_list_; 134 std::unique_ptr<BoundedReportList> retry_list_;
132 base::Clock* const clock_; 135 base::Clock* const clock_;
133 // Maximum age of a queued report. Reports older than this are discarded in 136 // Maximum age of a queued report. Reports older than this are discarded in
134 // the next SendPending() call. 137 // the next SendPending() call.
135 const base::TimeDelta report_ttl_; 138 const base::TimeDelta report_ttl_;
136 const bool retries_enabled_; 139 const bool retries_enabled_;
137 // Current report id, starting from zero and monotonically incrementing. 140 // Current report id, starting from zero and monotonically incrementing.
138 int current_report_id_; 141 int current_report_id_;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 base::Callback<void()> reset_callback_; 234 base::Callback<void()> reset_callback_;
232 235
233 // Encryption parameters. 236 // Encryption parameters.
234 uint8_t* server_public_key_; 237 uint8_t* server_public_key_;
235 uint32_t server_public_key_version_; 238 uint32_t server_public_key_version_;
236 239
237 DISALLOW_COPY_AND_ASSIGN(CertificateReportingService); 240 DISALLOW_COPY_AND_ASSIGN(CertificateReportingService);
238 }; 241 };
239 242
240 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_ 243 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698