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

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

Issue 2483993002: Add report_id to ErrorReporter interface. (Closed)
Patch Set: Rebase 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 22 matching lines...) Expand all
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(
43 const std::string& serialized_report) override; 43 const std::string& serialized_report,
44 const base::Callback<void()>& success_callback,
45 const base::Callback<void(const GURL&, int)>& error_callback) override;
44 46
45 // Returns the hostname in the report for the last call to |SendReport|. 47 // Returns the hostname in the report for the last call to |SendReport|.
46 const std::string& latest_hostname_reported() { 48 const std::string& latest_hostname_reported() {
47 return latest_hostname_reported_; 49 return latest_hostname_reported_;
48 } 50 }
49 51
50 private: 52 private:
51 std::string latest_hostname_reported_; 53 std::string latest_hostname_reported_;
52 54
53 DISALLOW_COPY_AND_ASSIGN(MockErrorReporter); 55 DISALLOW_COPY_AND_ASSIGN(MockErrorReporter);
(...skipping 27 matching lines...) Expand all
81 base::RunLoop* run_loop, 83 base::RunLoop* run_loop,
82 ExpectReport expect_report); 84 ExpectReport expect_report);
83 85
84 // Returns whether a report should be expected (due to the Finch config) 86 // Returns whether a report should be expected (due to the Finch config)
85 // if the user opts in. 87 // if the user opts in.
86 ExpectReport GetReportExpectedFromFinch(); 88 ExpectReport GetReportExpectedFromFinch();
87 89
88 } // namespace certificate_reporting_test_utils 90 } // namespace certificate_reporting_test_utils
89 91
90 #endif // CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_ 92 #endif // CHROME_BROWSER_SSL_CERTIFICATE_REPORTING_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager_unittest.cc ('k') | chrome/browser/ssl/certificate_reporting_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698