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

Side by Side Diff: chromecast/browser/metrics/cast_metrics_service_client.cc

Issue 2922493002: Default to new metrics service URL for non-Cast clients. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « chromecast/browser/metrics/OWNERS ('k') | components/metrics/metrics_service_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromecast/browser/metrics/cast_metrics_service_client.h" 5 #include "chromecast/browser/metrics/cast_metrics_service_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 task_runner_, done_callback, 236 task_runner_, done_callback,
237 base::TimeDelta::FromSeconds(kMetricsFetchTimeoutSeconds)); 237 base::TimeDelta::FromSeconds(kMetricsFetchTimeoutSeconds));
238 } 238 }
239 239
240 std::string CastMetricsServiceClient::GetMetricsServerUrl() { 240 std::string CastMetricsServiceClient::GetMetricsServerUrl() {
241 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 241 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
242 if (command_line->HasSwitch(switches::kOverrideMetricsUploadUrl)) { 242 if (command_line->HasSwitch(switches::kOverrideMetricsUploadUrl)) {
243 return command_line->GetSwitchValueASCII( 243 return command_line->GetSwitchValueASCII(
244 switches::kOverrideMetricsUploadUrl); 244 switches::kOverrideMetricsUploadUrl);
245 } 245 }
246 return ::metrics::MetricsServiceClient::GetMetricsServerUrl(); 246 // Note: This uses the old metrics service URL because some server-side
247 // provisioning is needed to support the extra Cast traffic on the new URL.
248 return ::metrics::kOldMetricsServerUrl;
247 } 249 }
248 250
249 std::unique_ptr<::metrics::MetricsLogUploader> 251 std::unique_ptr<::metrics::MetricsLogUploader>
250 CastMetricsServiceClient::CreateUploader( 252 CastMetricsServiceClient::CreateUploader(
251 base::StringPiece server_url, 253 base::StringPiece server_url,
252 base::StringPiece mime_type, 254 base::StringPiece mime_type,
253 ::metrics::MetricsLogUploader::MetricServiceType service_type, 255 ::metrics::MetricsLogUploader::MetricServiceType service_type,
254 const ::metrics::MetricsLogUploader::UploadCallback& on_upload_complete) { 256 const ::metrics::MetricsLogUploader::UploadCallback& on_upload_complete) {
255 return std::unique_ptr<::metrics::MetricsLogUploader>( 257 return std::unique_ptr<::metrics::MetricsLogUploader>(
256 new ::metrics::NetMetricsLogUploader(request_context_, server_url, 258 new ::metrics::NetMetricsLogUploader(request_context_, server_url,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 external_metrics_->StopAndDestroy(); 411 external_metrics_->StopAndDestroy();
410 external_metrics_ = nullptr; 412 external_metrics_ = nullptr;
411 platform_metrics_->StopAndDestroy(); 413 platform_metrics_->StopAndDestroy();
412 platform_metrics_ = nullptr; 414 platform_metrics_ = nullptr;
413 #endif // defined(OS_LINUX) 415 #endif // defined(OS_LINUX)
414 metrics_service_->Stop(); 416 metrics_service_->Stop();
415 } 417 }
416 418
417 } // namespace metrics 419 } // namespace metrics
418 } // namespace chromecast 420 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/metrics/OWNERS ('k') | components/metrics/metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698