Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: components/metrics/test_metrics_service_client.cc

Issue 2735443003: Use StringPiece for CreateUploader/NetMetricsLogUploader params. (Closed)
Patch Set: Nit and Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 7 #include <memory>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "components/metrics/metrics_log_uploader.h" 10 #include "components/metrics/metrics_log_uploader.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const base::Closure& done_callback) { 58 const base::Closure& done_callback) {
59 done_callback.Run(); 59 done_callback.Run();
60 } 60 }
61 61
62 void TestMetricsServiceClient::CollectFinalMetricsForLog( 62 void TestMetricsServiceClient::CollectFinalMetricsForLog(
63 const base::Closure& done_callback) { 63 const base::Closure& done_callback) {
64 done_callback.Run(); 64 done_callback.Run();
65 } 65 }
66 66
67 std::unique_ptr<MetricsLogUploader> TestMetricsServiceClient::CreateUploader( 67 std::unique_ptr<MetricsLogUploader> TestMetricsServiceClient::CreateUploader(
68 const std::string& server_url, 68 base::StringPiece server_url,
69 const std::string& mime_type, 69 base::StringPiece mime_type,
70 MetricsLogUploader::MetricServiceType service_type, 70 MetricsLogUploader::MetricServiceType service_type,
71 const base::Callback<void(int)>& on_upload_complete) { 71 const base::Callback<void(int)>& on_upload_complete) {
72 uploader_ = new TestMetricsLogUploader(server_url, mime_type, service_type, 72 uploader_ = new TestMetricsLogUploader(on_upload_complete);
73 on_upload_complete);
74 return std::unique_ptr<MetricsLogUploader>(uploader_); 73 return std::unique_ptr<MetricsLogUploader>(uploader_);
75 } 74 }
76 75
77 base::TimeDelta TestMetricsServiceClient::GetStandardUploadInterval() { 76 base::TimeDelta TestMetricsServiceClient::GetStandardUploadInterval() {
78 return base::TimeDelta::FromMinutes(5); 77 return base::TimeDelta::FromMinutes(5);
79 } 78 }
80 79
81 bool TestMetricsServiceClient::IsReportingPolicyManaged() { 80 bool TestMetricsServiceClient::IsReportingPolicyManaged() {
82 return reporting_is_managed_; 81 return reporting_is_managed_;
83 } 82 }
84 83
85 EnableMetricsDefault 84 EnableMetricsDefault
86 TestMetricsServiceClient::GetMetricsReportingDefaultState() { 85 TestMetricsServiceClient::GetMetricsReportingDefaultState() {
87 return enable_default_; 86 return enable_default_;
88 } 87 }
89 88
90 } // namespace metrics 89 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/test_metrics_service_client.h ('k') | ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698