| 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 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Returns the MetricsService instance that this client is associated with. | 34 // Returns the MetricsService instance that this client is associated with. |
| 35 // With the exception of testing contexts, the returned instance must be valid | 35 // With the exception of testing contexts, the returned instance must be valid |
| 36 // for the lifetime of this object (typically, the embedder's client | 36 // for the lifetime of this object (typically, the embedder's client |
| 37 // implementation will own the MetricsService instance being returned). | 37 // implementation will own the MetricsService instance being returned). |
| 38 virtual MetricsService* GetMetricsService() = 0; | 38 virtual MetricsService* GetMetricsService() = 0; |
| 39 | 39 |
| 40 // Registers the client id with other services (e.g. crash reporting), called | 40 // Registers the client id with other services (e.g. crash reporting), called |
| 41 // when metrics recording gets enabled. | 41 // when metrics recording gets enabled. |
| 42 virtual void SetMetricsClientId(const std::string& client_id) = 0; | 42 virtual void SetMetricsClientId(const std::string& client_id) = 0; |
| 43 | 43 |
| 44 // Whether there's an "off the record" (aka "Incognito") session active. | |
| 45 virtual bool IsOffTheRecordSessionActive() = 0; | |
| 46 | |
| 47 // Returns the product value to use in uploaded reports, which will be used to | 44 // Returns the product value to use in uploaded reports, which will be used to |
| 48 // set the ChromeUserMetricsExtension.product field. See comments on that | 45 // set the ChromeUserMetricsExtension.product field. See comments on that |
| 49 // field on why it's an int32_t rather than an enum. | 46 // field on why it's an int32_t rather than an enum. |
| 50 virtual int32_t GetProduct() = 0; | 47 virtual int32_t GetProduct() = 0; |
| 51 | 48 |
| 52 // Returns the current application locale (e.g. "en-US"). | 49 // Returns the current application locale (e.g. "en-US"). |
| 53 virtual std::string GetApplicationLocale() = 0; | 50 virtual std::string GetApplicationLocale() = 0; |
| 54 | 51 |
| 55 // Retrieves the brand code string associated with the install, returning | 52 // Retrieves the brand code string associated with the install, returning |
| 56 // false if no brand code is available. | 53 // false if no brand code is available. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // shown during first-run. | 100 // shown during first-run. |
| 104 virtual EnableMetricsDefault GetMetricsReportingDefaultState(); | 101 virtual EnableMetricsDefault GetMetricsReportingDefaultState(); |
| 105 | 102 |
| 106 // Returns whether cellular logic is enabled for metrics reporting. | 103 // Returns whether cellular logic is enabled for metrics reporting. |
| 107 virtual bool IsUMACellularUploadLogicEnabled(); | 104 virtual bool IsUMACellularUploadLogicEnabled(); |
| 108 }; | 105 }; |
| 109 | 106 |
| 110 } // namespace metrics | 107 } // namespace metrics |
| 111 | 108 |
| 112 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ | 109 #endif // COMPONENTS_METRICS_METRICS_SERVICE_CLIENT_H_ |
| OLD | NEW |