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

Side by Side Diff: chrome/browser/ssl/certificate_reporting_test_utils.h

Issue 2483993002: Add report_id to ErrorReporter interface. (Closed)
Patch Set: Created 4 years, 1 month 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 #ifndef CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_ 5 #ifndef CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_
6 #define CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_ 6 #define CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 // the user opts in to do so on the interstitial. It keeps track of the 32 // the user opts in to do so on the interstitial. It keeps track of the
33 // most recent hostname for which an extended reporting report would 33 // most recent hostname for which an extended reporting report would
34 // have been sent over the network. 34 // have been sent over the network.
35 class MockErrorReporter : public certificate_reporting::ErrorReporter { 35 class MockErrorReporter : public certificate_reporting::ErrorReporter {
36 public: 36 public:
37 MockErrorReporter(net::URLRequestContext* request_context, 37 MockErrorReporter(net::URLRequestContext* request_context,
38 const GURL& upload_url, 38 const GURL& upload_url,
39 net::ReportSender::CookiesPreference cookies_preference); 39 net::ReportSender::CookiesPreference cookies_preference);
40 40
41 // ErrorReporter implementation. 41 // ErrorReporter implementation.
42 void SendExtendedReportingReport( 42 void SendExtendedReportingReport(const std::string& serialized_report,
43 const std::string& serialized_report) override; 43 int report_id) override;
44 44
45 // Returns the hostname in the report for the last call to |SendReport|. 45 // Returns the hostname in the report for the last call to |SendReport|.
46 const std::string& latest_hostname_reported() { 46 const std::string& latest_hostname_reported() {
47 return latest_hostname_reported_; 47 return latest_hostname_reported_;
48 } 48 }
49 49
50 private: 50 private:
51 std::string latest_hostname_reported_; 51 std::string latest_hostname_reported_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(MockErrorReporter); 53 DISALLOW_COPY_AND_ASSIGN(MockErrorReporter);
(...skipping 27 matching lines...) Expand all
81 base::RunLoop* run_loop, 81 base::RunLoop* run_loop,
82 ExpectReport expect_report); 82 ExpectReport expect_report);
83 83
84 // Returns whether a report should be expected (due to the Finch config) 84 // Returns whether a report should be expected (due to the Finch config)
85 // if the user opts in. 85 // if the user opts in.
86 ExpectReport GetReportExpectedFromFinch(); 86 ExpectReport GetReportExpectedFromFinch();
87 87
88 } // namespace certificate_reporting_test_utils 88 } // namespace certificate_reporting_test_utils
89 89
90 #endif // CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_ 90 #endif // CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698