OLD | NEW |
---|---|
(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_METRICS_SERVICE_CLIENT_H_ | |
6 #define COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "components/metrics/proto/system_profile.pb.h" | |
Ilya Sherman
2014/05/19 11:51:14
nit: Duplicated line.
Alexei Svitkine (slow)
2014/05/19 11:52:15
Oops, fixed.
| |
12 #include "components/metrics/proto/system_profile.pb.h" | |
13 | |
14 namespace metrics { | |
15 | |
16 // An abstraction of operations that depend on the embedder's (e.g. Chrome) | |
17 // environment. | |
18 class MetricsServiceClient { | |
19 public: | |
20 virtual ~MetricsServiceClient() {} | |
21 | |
22 // Register the client id with other services (e.g. crash reporting), called | |
23 // when metrics recording gets enabled. | |
24 virtual void SetClientID(const std::string& client_id) = 0; | |
25 | |
26 // Whether there's an "off the record" (aka "Incognito") session active. | |
27 virtual bool IsOffTheRecordSessionActive() = 0; | |
28 | |
29 // Returns the current application locale (e.g. "en-US"). | |
30 virtual std::string GetApplicationLocale() = 0; | |
31 | |
32 // Retrieves the brand code string associated with the install, returning | |
33 // false if no brand code is available. | |
34 virtual bool GetBrand(std::string* brand_code) = 0; | |
35 | |
36 // Returns the release channel (e.g. stable, beta, etc) of the application. | |
37 virtual SystemProfileProto::Channel GetChannel() = 0; | |
38 | |
39 // Returns the version of the application as a string. | |
40 virtual std::string GetVersionString() = 0; | |
41 }; | |
42 | |
43 } // namespace metrics | |
44 | |
45 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | |
OLD | NEW |