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

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

Issue 2164513002: Add browsertest for permission action reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-hooks-to-permission-layer2
Patch Set: Remove android tests + Move MockReportSender to separate file Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/url_request/report_sender.h"
raymes 2016/07/26 07:42:06 nit: nothing should be above the guards
stefanocs 2016/07/26 11:17:37 Done.
6
7 #ifndef CHROME_BROWSER_SAFE_BROWSING_MOCK_REPORT_SENDER_H_
8 #define CHROME_BROWSER_SAFE_BROWSING_MOCK_REPORT_SENDER_H_
9
10 namespace safe_browsing {
11
12 // A mock ReportSender that keeps track of the last report sent.
13 class MockReportSender : public net::ReportSender {
14 public:
15 MockReportSender();
16
17 ~MockReportSender() override;
18
19 void Send(const GURL& report_uri, const std::string& report) override;
20
21 const GURL& latest_report_uri();
22
23 const std::string& latest_report();
24
25 int GetAndResetNumberOfReportsSent();
26
27 private:
28 GURL latest_report_uri_;
29 std::string latest_report_;
30 int number_of_reports_;
31
32 DISALLOW_COPY_AND_ASSIGN(MockReportSender);
33 };
34
35 } // namespace safe_browsing
36
37 #endif // CHROME_BROWSER_SAFE_BROWSING_MOCK_REPORT_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698