| 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 #include "components/metrics/test_metrics_service_client.h" | 5 #include "components/metrics/test_metrics_service_client.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "components/metrics/metrics_log_uploader.h" | 8 #include "components/metrics/metrics_log_uploader.h" |
| 9 | 9 |
| 10 namespace metrics { | 10 namespace metrics { |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 const char TestMetricsServiceClient::kBrandForTesting[] = "brand_for_testing"; | 13 const char TestMetricsServiceClient::kBrandForTesting[] = "brand_for_testing"; |
| 14 | 14 |
| 15 TestMetricsServiceClient::TestMetricsServiceClient() | 15 TestMetricsServiceClient::TestMetricsServiceClient() |
| 16 : install_date_(0), | 16 : version_string_("5.0.322.0-64-devel") { |
| 17 version_string_("5.0.322.0-64-devel") { | |
| 18 } | 17 } |
| 19 | 18 |
| 20 TestMetricsServiceClient::~TestMetricsServiceClient() { | 19 TestMetricsServiceClient::~TestMetricsServiceClient() { |
| 21 } | 20 } |
| 22 | 21 |
| 23 void TestMetricsServiceClient::SetClientID(const std::string& client_id) { | 22 void TestMetricsServiceClient::SetClientID(const std::string& client_id) { |
| 24 client_id_ = client_id; | 23 client_id_ = client_id; |
| 25 } | 24 } |
| 26 | 25 |
| 27 bool TestMetricsServiceClient::IsOffTheRecordSessionActive() { | 26 bool TestMetricsServiceClient::IsOffTheRecordSessionActive() { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 } | 37 } |
| 39 | 38 |
| 40 SystemProfileProto::Channel TestMetricsServiceClient::GetChannel() { | 39 SystemProfileProto::Channel TestMetricsServiceClient::GetChannel() { |
| 41 return SystemProfileProto::CHANNEL_BETA; | 40 return SystemProfileProto::CHANNEL_BETA; |
| 42 } | 41 } |
| 43 | 42 |
| 44 std::string TestMetricsServiceClient::GetVersionString() { | 43 std::string TestMetricsServiceClient::GetVersionString() { |
| 45 return version_string_; | 44 return version_string_; |
| 46 } | 45 } |
| 47 | 46 |
| 48 int64 TestMetricsServiceClient::GetInstallDate() { | |
| 49 return install_date_; | |
| 50 } | |
| 51 | |
| 52 void TestMetricsServiceClient::OnLogUploadComplete() { | 47 void TestMetricsServiceClient::OnLogUploadComplete() { |
| 53 } | 48 } |
| 54 | 49 |
| 55 void TestMetricsServiceClient::StartGatheringMetrics( | 50 void TestMetricsServiceClient::StartGatheringMetrics( |
| 56 const base::Closure& done_callback) { | 51 const base::Closure& done_callback) { |
| 57 done_callback.Run(); | 52 done_callback.Run(); |
| 58 } | 53 } |
| 59 | 54 |
| 60 void TestMetricsServiceClient::CollectFinalMetrics( | 55 void TestMetricsServiceClient::CollectFinalMetrics( |
| 61 const base::Closure& done_callback) { | 56 const base::Closure& done_callback) { |
| 62 done_callback.Run(); | 57 done_callback.Run(); |
| 63 } | 58 } |
| 64 | 59 |
| 65 scoped_ptr<MetricsLogUploader> TestMetricsServiceClient::CreateUploader( | 60 scoped_ptr<MetricsLogUploader> TestMetricsServiceClient::CreateUploader( |
| 66 const std::string& server_url, | 61 const std::string& server_url, |
| 67 const std::string& mime_type, | 62 const std::string& mime_type, |
| 68 const base::Callback<void(int)>& on_upload_complete) { | 63 const base::Callback<void(int)>& on_upload_complete) { |
| 69 return scoped_ptr<MetricsLogUploader>(); | 64 return scoped_ptr<MetricsLogUploader>(); |
| 70 } | 65 } |
| 71 | 66 |
| 72 } // namespace metrics | 67 } // namespace metrics |
| OLD | NEW |