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

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

Issue 290343005: Pass MetricsServiceClient into MetricsService, and create a simple stubbed TestMetricsServiceClient… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « components/metrics.gypi ('k') | components/metrics/test_metrics_service_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
6 #define COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
7
8 #include "components/metrics/metrics_service_client.h"
9
10 namespace metrics {
11
12 // A simple concrete implementation of the MetricsServiceClient interface, for
13 // use in tests.
14 class TestMetricsServiceClient : public MetricsServiceClient {
15 public:
16 TestMetricsServiceClient();
17 virtual ~TestMetricsServiceClient();
18
19 // MetricsServiceClient:
20 virtual void SetClientID(const std::string& client_id) OVERRIDE;
21 virtual bool IsOffTheRecordSessionActive() OVERRIDE;
22 virtual std::string GetApplicationLocale() OVERRIDE;
23 virtual bool GetBrand(std::string* brand_code) OVERRIDE;
24 virtual SystemProfileProto::Channel GetChannel() OVERRIDE;
25 virtual std::string GetVersionString() OVERRIDE;
26
27 const std::string& get_client_id() const { return client_id_; }
28
29 private:
30 std::string client_id_;
31 };
32
33 } // namespace metrics
34
35 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « components/metrics.gypi ('k') | components/metrics/test_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698