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

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

Issue 293023005: Move MetricsService final log collection tasks to client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
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 <string>
9
8 #include "components/metrics/metrics_service_client.h" 10 #include "components/metrics/metrics_service_client.h"
9 11
10 namespace metrics { 12 namespace metrics {
11 13
12 // A simple concrete implementation of the MetricsServiceClient interface, for 14 // A simple concrete implementation of the MetricsServiceClient interface, for
13 // use in tests. 15 // use in tests.
14 class TestMetricsServiceClient : public MetricsServiceClient { 16 class TestMetricsServiceClient : public MetricsServiceClient {
15 public: 17 public:
16 static const char kBrandForTesting[]; 18 static const char kBrandForTesting[];
17 19
18 TestMetricsServiceClient(); 20 TestMetricsServiceClient();
19 virtual ~TestMetricsServiceClient(); 21 virtual ~TestMetricsServiceClient();
20 22
21 // MetricsServiceClient: 23 // MetricsServiceClient:
22 virtual void SetClientID(const std::string& client_id) OVERRIDE; 24 virtual void SetClientID(const std::string& client_id) OVERRIDE;
23 virtual bool IsOffTheRecordSessionActive() OVERRIDE; 25 virtual bool IsOffTheRecordSessionActive() OVERRIDE;
24 virtual std::string GetApplicationLocale() OVERRIDE; 26 virtual std::string GetApplicationLocale() OVERRIDE;
25 virtual bool GetBrand(std::string* brand_code) OVERRIDE; 27 virtual bool GetBrand(std::string* brand_code) OVERRIDE;
26 virtual SystemProfileProto::Channel GetChannel() OVERRIDE; 28 virtual SystemProfileProto::Channel GetChannel() OVERRIDE;
27 virtual std::string GetVersionString() OVERRIDE; 29 virtual std::string GetVersionString() OVERRIDE;
28 virtual void OnLogUploadComplete() OVERRIDE; 30 virtual void OnLogUploadComplete() OVERRIDE;
31 virtual void CollectFinalMetrics(const base::Closure& done_callback)
32 OVERRIDE;
29 33
30 const std::string& get_client_id() const { return client_id_; } 34 const std::string& get_client_id() const { return client_id_; }
31 35
32 private: 36 private:
33 std::string client_id_; 37 std::string client_id_;
34 }; 38 };
35 39
36 } // namespace metrics 40 } // namespace metrics
37 41
38 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_ 42 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « components/metrics/metrics_service_client.h ('k') | components/metrics/test_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698