Chromium Code Reviews| 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_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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 bool GetBrand(std::string* brand_code) override; | 33 bool GetBrand(std::string* brand_code) override; |
| 34 SystemProfileProto::Channel GetChannel() override; | 34 SystemProfileProto::Channel GetChannel() override; |
| 35 std::string GetVersionString() override; | 35 std::string GetVersionString() override; |
| 36 void OnLogUploadComplete() override; | 36 void OnLogUploadComplete() override; |
| 37 void InitializeSystemProfileMetrics( | 37 void InitializeSystemProfileMetrics( |
| 38 const base::Closure& done_callback) override; | 38 const base::Closure& done_callback) override; |
| 39 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; | 39 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
| 40 scoped_ptr<MetricsLogUploader> CreateUploader( | 40 scoped_ptr<MetricsLogUploader> CreateUploader( |
| 41 const base::Callback<void(int)>& on_upload_complete) override; | 41 const base::Callback<void(int)>& on_upload_complete) override; |
| 42 base::TimeDelta GetStandardUploadInterval() override; | 42 base::TimeDelta GetStandardUploadInterval() override; |
| 43 scoped_refptr<base::SingleThreadTaskRunner> | |
| 44 GetMainThreadTaskRunner() override; | |
| 43 bool IsReportingPolicyManaged() override; | 45 bool IsReportingPolicyManaged() override; |
| 44 MetricsServiceClient::EnableMetricsDefault GetDefaultOptIn() override; | 46 MetricsServiceClient::EnableMetricsDefault GetDefaultOptIn() override; |
| 45 | 47 |
| 48 | |
|
Ilya Sherman
2016/04/07 18:21:54
nit: Spurious newline.
beaudoin
2016/04/07 21:12:58
Done.
| |
| 46 const std::string& get_client_id() const { return client_id_; } | 49 const std::string& get_client_id() const { return client_id_; } |
| 47 void set_version_string(const std::string& str) { version_string_ = str; } | 50 void set_version_string(const std::string& str) { version_string_ = str; } |
| 48 void set_product(int32_t product) { product_ = product; } | 51 void set_product(int32_t product) { product_ = product; } |
| 49 void set_reporting_is_managed(bool managed) { | 52 void set_reporting_is_managed(bool managed) { |
| 50 reporting_is_managed_ = managed; | 53 reporting_is_managed_ = managed; |
| 51 } | 54 } |
| 52 void set_enable_default( | 55 void set_enable_default( |
| 53 MetricsServiceClient::EnableMetricsDefault enable_default) { | 56 MetricsServiceClient::EnableMetricsDefault enable_default) { |
| 54 enable_default_ = enable_default; | 57 enable_default_ = enable_default; |
| 55 } | 58 } |
| 56 | 59 |
| 57 private: | 60 private: |
| 58 std::string client_id_; | 61 std::string client_id_; |
| 59 std::string version_string_; | 62 std::string version_string_; |
| 60 int32_t product_; | 63 int32_t product_; |
| 61 bool reporting_is_managed_; | 64 bool reporting_is_managed_; |
| 62 MetricsServiceClient::EnableMetricsDefault enable_default_; | 65 MetricsServiceClient::EnableMetricsDefault enable_default_; |
| 66 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | |
| 63 | 67 |
| 64 DISALLOW_COPY_AND_ASSIGN(TestMetricsServiceClient); | 68 DISALLOW_COPY_AND_ASSIGN(TestMetricsServiceClient); |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 } // namespace metrics | 71 } // namespace metrics |
| 68 | 72 |
| 69 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_ | 73 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_ |
| OLD | NEW |