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

Side by Side Diff: blimp/engine/app/blimp_metrics_service_client.cc

Issue 2614533002: Add server_url and mime_type params to CreateUploader. (Closed)
Patch Set: Missing Include Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/engine/app/blimp_metrics_service_client.h" 5 #include "blimp/engine/app/blimp_metrics_service_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 void BlimpMetricsServiceClient::CollectFinalMetricsForLog( 133 void BlimpMetricsServiceClient::CollectFinalMetricsForLog(
134 const base::Closure& done_callback) { 134 const base::Closure& done_callback) {
135 // Blimp requires no additional work to CollectFinalMetricsForLog 135 // Blimp requires no additional work to CollectFinalMetricsForLog
136 // and should proceed to the next call in the chain 136 // and should proceed to the next call in the chain
137 done_callback.Run(); 137 done_callback.Run();
138 } 138 }
139 139
140 std::unique_ptr<metrics::MetricsLogUploader> 140 std::unique_ptr<metrics::MetricsLogUploader>
141 BlimpMetricsServiceClient::CreateUploader( 141 BlimpMetricsServiceClient::CreateUploader(
142 const std::string& server_url,
143 const std::string& mime_type,
142 const base::Callback<void(int)>& on_upload_complete) { 144 const base::Callback<void(int)>& on_upload_complete) {
143 return base::WrapUnique<metrics::MetricsLogUploader>( 145 return base::WrapUnique<metrics::MetricsLogUploader>(
144 new metrics::NetMetricsLogUploader( 146 new metrics::NetMetricsLogUploader(
145 request_context_getter_.get(), metrics::kDefaultMetricsServerUrl, 147 request_context_getter_.get(), server_url,
146 metrics::kDefaultMetricsMimeType, on_upload_complete)); 148 mime_type, on_upload_complete));
147 } 149 }
148 150
149 base::TimeDelta BlimpMetricsServiceClient::GetStandardUploadInterval() { 151 base::TimeDelta BlimpMetricsServiceClient::GetStandardUploadInterval() {
150 return base::TimeDelta::FromMinutes(kStandardUploadIntervalMinutes); 152 return base::TimeDelta::FromMinutes(kStandardUploadIntervalMinutes);
151 } 153 }
152 154
153 metrics::EnableMetricsDefault 155 metrics::EnableMetricsDefault
154 BlimpMetricsServiceClient::GetMetricsReportingDefaultState() { 156 BlimpMetricsServiceClient::GetMetricsReportingDefaultState() {
155 return metrics::EnableMetricsDefault::OPT_IN; 157 return metrics::EnableMetricsDefault::OPT_IN;
156 } 158 }
157 159
158 bool BlimpMetricsServiceClient::IsConsentGiven() { 160 bool BlimpMetricsServiceClient::IsConsentGiven() {
159 return true; 161 return true;
160 } 162 }
161 163
162 } // namespace engine 164 } // namespace engine
163 } // namespace blimp 165 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_metrics_service_client.h ('k') | chrome/browser/metrics/chrome_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698