OLD | NEW |
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_METRICS_SERVICE_CLIENT_H_ | 5 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
6 #define COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 6 #define COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | |
12 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
13 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
14 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
16 #include "components/metrics/proto/system_profile.pb.h" | 15 #include "components/metrics/proto/system_profile.pb.h" |
17 | 16 |
18 namespace base { | 17 namespace base { |
19 class FilePath; | 18 class FilePath; |
20 } | 19 } |
21 | 20 |
(...skipping 20 matching lines...) Expand all Loading... |
42 | 41 |
43 // Notifies the client that recording is disabled, so that other services | 42 // Notifies the client that recording is disabled, so that other services |
44 // (such as crash reporting) can clear any association with metrics. | 43 // (such as crash reporting) can clear any association with metrics. |
45 virtual void OnRecordingDisabled() = 0; | 44 virtual void OnRecordingDisabled() = 0; |
46 | 45 |
47 // Whether there's an "off the record" (aka "Incognito") session active. | 46 // Whether there's an "off the record" (aka "Incognito") session active. |
48 virtual bool IsOffTheRecordSessionActive() = 0; | 47 virtual bool IsOffTheRecordSessionActive() = 0; |
49 | 48 |
50 // Returns the product value to use in uploaded reports, which will be used to | 49 // Returns the product value to use in uploaded reports, which will be used to |
51 // set the ChromeUserMetricsExtension.product field. See comments on that | 50 // set the ChromeUserMetricsExtension.product field. See comments on that |
52 // field on why it's an int32 rather than an enum. | 51 // field on why it's an int32_t rather than an enum. |
53 virtual int32_t GetProduct() = 0; | 52 virtual int32_t GetProduct() = 0; |
54 | 53 |
55 // Returns the current application locale (e.g. "en-US"). | 54 // Returns the current application locale (e.g. "en-US"). |
56 virtual std::string GetApplicationLocale() = 0; | 55 virtual std::string GetApplicationLocale() = 0; |
57 | 56 |
58 // Retrieves the brand code string associated with the install, returning | 57 // Retrieves the brand code string associated with the install, returning |
59 // false if no brand code is available. | 58 // false if no brand code is available. |
60 virtual bool GetBrand(std::string* brand_code) = 0; | 59 virtual bool GetBrand(std::string* brand_code) = 0; |
61 | 60 |
62 // Returns the release channel (e.g. stable, beta, etc) of the application. | 61 // Returns the release channel (e.g. stable, beta, etc) of the application. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 95 |
97 // Called on renderer crashes in some embedders (e.g., those that do not use | 96 // Called on renderer crashes in some embedders (e.g., those that do not use |
98 // //content and thus do not have //content's notification system available | 97 // //content and thus do not have //content's notification system available |
99 // as a mechanism for observing renderer crashes). | 98 // as a mechanism for observing renderer crashes). |
100 virtual void OnRendererProcessCrash() {} | 99 virtual void OnRendererProcessCrash() {} |
101 }; | 100 }; |
102 | 101 |
103 } // namespace metrics | 102 } // namespace metrics |
104 | 103 |
105 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 104 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |