blob: e5e97780ec0fad9d4688c0198397ff70908363b1 [file] [log] [blame]
[email protected]728de072014-05-21 09:20:321// 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.
4
5#include "components/metrics/test_metrics_service_client.h"
6
[email protected]4b4892b2014-05-22 15:06:157#include "base/callback.h"
[email protected]0d5a61a82014-05-31 22:28:348#include "components/metrics/metrics_log_uploader.h"
[email protected]4b4892b2014-05-22 15:06:159
[email protected]728de072014-05-21 09:20:3210namespace metrics {
11
[email protected]09dee82d2014-05-22 14:00:5312// static
13const char TestMetricsServiceClient::kBrandForTesting[] = "brand_for_testing";
14
[email protected]91b1d912014-06-05 10:52:0815TestMetricsServiceClient::TestMetricsServiceClient()
[email protected]65801452014-07-09 05:42:4116 : version_string_("5.0.322.0-64-devel") {
[email protected]728de072014-05-21 09:20:3217}
18
19TestMetricsServiceClient::~TestMetricsServiceClient() {
20}
21
[email protected]9d1b0152014-07-09 18:53:2222void TestMetricsServiceClient::SetMetricsClientId(
23 const std::string& client_id) {
[email protected]728de072014-05-21 09:20:3224 client_id_ = client_id;
25}
26
27bool TestMetricsServiceClient::IsOffTheRecordSessionActive() {
28 return false;
29}
30
31std::string TestMetricsServiceClient::GetApplicationLocale() {
32 return "en-US";
33}
34
35bool TestMetricsServiceClient::GetBrand(std::string* brand_code) {
[email protected]09dee82d2014-05-22 14:00:5336 *brand_code = kBrandForTesting;
[email protected]728de072014-05-21 09:20:3237 return true;
38}
39
40SystemProfileProto::Channel TestMetricsServiceClient::GetChannel() {
41 return SystemProfileProto::CHANNEL_BETA;
42}
43
44std::string TestMetricsServiceClient::GetVersionString() {
[email protected]bfb77b52014-06-07 01:54:0145 return version_string_;
[email protected]728de072014-05-21 09:20:3246}
47
[email protected]73929422014-05-22 08:19:0548void TestMetricsServiceClient::OnLogUploadComplete() {
49}
50
[email protected]06c10832014-05-23 10:55:5551void TestMetricsServiceClient::StartGatheringMetrics(
52 const base::Closure& done_callback) {
53 done_callback.Run();
54}
55
[email protected]4b4892b2014-05-22 15:06:1556void TestMetricsServiceClient::CollectFinalMetrics(
57 const base::Closure& done_callback) {
58 done_callback.Run();
59}
60
[email protected]0d5a61a82014-05-31 22:28:3461scoped_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>();
66}
67
[email protected]728de072014-05-21 09:20:3268} // namespace metrics