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.
5 #include "components/metrics/test_metrics_service_client.h"
7 #include "base/callback.h"
8 #include "components/metrics/metrics_log_uploader.h"
13 const char TestMetricsServiceClient::kBrandForTesting
[] = "brand_for_testing";
15 TestMetricsServiceClient::TestMetricsServiceClient()
16 : version_string_("5.0.322.0-64-devel") {
19 TestMetricsServiceClient::~TestMetricsServiceClient() {
22 void TestMetricsServiceClient::SetMetricsClientId(
23 const std::string
& client_id
) {
24 client_id_
= client_id
;
27 bool TestMetricsServiceClient::IsOffTheRecordSessionActive() {
31 std::string
TestMetricsServiceClient::GetApplicationLocale() {
35 bool TestMetricsServiceClient::GetBrand(std::string
* brand_code
) {
36 *brand_code
= kBrandForTesting
;
40 SystemProfileProto::Channel
TestMetricsServiceClient::GetChannel() {
41 return SystemProfileProto::CHANNEL_BETA
;
44 std::string
TestMetricsServiceClient::GetVersionString() {
45 return version_string_
;
48 void TestMetricsServiceClient::OnLogUploadComplete() {
51 void TestMetricsServiceClient::StartGatheringMetrics(
52 const base::Closure
& done_callback
) {
56 void TestMetricsServiceClient::CollectFinalMetrics(
57 const base::Closure
& done_callback
) {
61 scoped_ptr
<MetricsLogUploader
> TestMetricsServiceClient::CreateUploader(
62 const std::string
& server_url
,
63 const std::string
& mime_type
,
64 const base::Callback
<void(int)>& on_upload_complete
) {
65 return scoped_ptr
<MetricsLogUploader
>();
68 } // namespace metrics