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

Side by Side Diff: components/metrics/test_metrics_service_client.h

Issue 2248793002: Remove OnRecordingDisabled() metrics client interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add helper function 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_ 5 #ifndef COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
6 #define COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_ 6 #define COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/metrics/metrics_service_client.h" 13 #include "components/metrics/metrics_service_client.h"
14 14
15 namespace metrics { 15 namespace metrics {
16 16
17 // A simple concrete implementation of the MetricsServiceClient interface, for 17 // A simple concrete implementation of the MetricsServiceClient interface, for
18 // use in tests. 18 // use in tests.
19 class TestMetricsServiceClient : public MetricsServiceClient { 19 class TestMetricsServiceClient : public MetricsServiceClient {
20 public: 20 public:
21 static const char kBrandForTesting[]; 21 static const char kBrandForTesting[];
22 22
23 TestMetricsServiceClient(); 23 TestMetricsServiceClient();
24 ~TestMetricsServiceClient() override; 24 ~TestMetricsServiceClient() override;
25 25
26 // MetricsServiceClient: 26 // MetricsServiceClient:
27 metrics::MetricsService* GetMetricsService() override; 27 metrics::MetricsService* GetMetricsService() override;
28 void SetMetricsClientId(const std::string& client_id) override; 28 void SetMetricsClientId(const std::string& client_id) override;
29 void OnRecordingDisabled() override;
30 bool IsOffTheRecordSessionActive() override; 29 bool IsOffTheRecordSessionActive() override;
31 int32_t GetProduct() override; 30 int32_t GetProduct() override;
32 std::string GetApplicationLocale() override; 31 std::string GetApplicationLocale() override;
33 bool GetBrand(std::string* brand_code) override; 32 bool GetBrand(std::string* brand_code) override;
34 SystemProfileProto::Channel GetChannel() override; 33 SystemProfileProto::Channel GetChannel() override;
35 std::string GetVersionString() override; 34 std::string GetVersionString() override;
36 void OnLogUploadComplete() override; 35 void OnLogUploadComplete() override;
37 void InitializeSystemProfileMetrics( 36 void InitializeSystemProfileMetrics(
38 const base::Closure& done_callback) override; 37 const base::Closure& done_callback) override;
39 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; 38 void CollectFinalMetricsForLog(const base::Closure& done_callback) override;
(...skipping 19 matching lines...) Expand all
59 int32_t product_; 58 int32_t product_;
60 bool reporting_is_managed_; 59 bool reporting_is_managed_;
61 EnableMetricsDefault enable_default_; 60 EnableMetricsDefault enable_default_;
62 61
63 DISALLOW_COPY_AND_ASSIGN(TestMetricsServiceClient); 62 DISALLOW_COPY_AND_ASSIGN(TestMetricsServiceClient);
64 }; 63 };
65 64
66 } // namespace metrics 65 } // namespace metrics
67 66
68 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_ 67 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698