Update V8 to version 4.6.62.
[chromium-blink-merge.git] / components / metrics / test_metrics_service_client.cc
blobb0166729c407bbb31bcf03193757fcbee736113d
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"
9 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h"
11 namespace metrics {
13 // static
14 const char TestMetricsServiceClient::kBrandForTesting[] = "brand_for_testing";
16 TestMetricsServiceClient::TestMetricsServiceClient()
17 : version_string_("5.0.322.0-64-devel"),
18 product_(ChromeUserMetricsExtension::CHROME) {
21 TestMetricsServiceClient::~TestMetricsServiceClient() {
24 void TestMetricsServiceClient::SetMetricsClientId(
25 const std::string& client_id) {
26 client_id_ = client_id;
29 void TestMetricsServiceClient::OnRecordingDisabled() {
32 bool TestMetricsServiceClient::IsOffTheRecordSessionActive() {
33 return false;
36 int32_t TestMetricsServiceClient::GetProduct() {
37 return product_;
40 std::string TestMetricsServiceClient::GetApplicationLocale() {
41 return "en-US";
44 bool TestMetricsServiceClient::GetBrand(std::string* brand_code) {
45 *brand_code = kBrandForTesting;
46 return true;
49 SystemProfileProto::Channel TestMetricsServiceClient::GetChannel() {
50 return SystemProfileProto::CHANNEL_BETA;
53 std::string TestMetricsServiceClient::GetVersionString() {
54 return version_string_;
57 void TestMetricsServiceClient::OnLogUploadComplete() {
60 void TestMetricsServiceClient::StartGatheringMetrics(
61 const base::Closure& done_callback) {
62 done_callback.Run();
65 void TestMetricsServiceClient::CollectFinalMetrics(
66 const base::Closure& done_callback) {
67 done_callback.Run();
70 scoped_ptr<MetricsLogUploader> TestMetricsServiceClient::CreateUploader(
71 const base::Callback<void(int)>& on_upload_complete) {
72 return scoped_ptr<MetricsLogUploader>();
75 base::TimeDelta TestMetricsServiceClient::GetStandardUploadInterval() {
76 return base::TimeDelta::FromMinutes(5);
79 } // namespace metrics