diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 21:30:55 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 21:30:55 +0000 |
commit | 79bf0b7f82e175eb3a2ae404f039b1d38b941c8b (patch) | |
tree | f054f00360fd1072498e9c4acb3300f088b18138 /chrome/browser/metrics/metrics_service.cc | |
parent | 391a67e29fdc29251ac634c98a8a99339568cf91 (diff) | |
download | chromium_src-79bf0b7f82e175eb3a2ae404f039b1d38b941c8b.zip chromium_src-79bf0b7f82e175eb3a2ae404f039b1d38b941c8b.tar.gz chromium_src-79bf0b7f82e175eb3a2ae404f039b1d38b941c8b.tar.bz2 |
Do not send stats from Chromium builds.
BUG=1435533
Review URL: http://codereview.chromium.org/93109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics/metrics_service.cc')
-rw-r--r-- | chrome/browser/metrics/metrics_service.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index 1e447ea..6cdbb8b 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -194,6 +194,7 @@ // TODO(port): Move these headers above as they are ported. #include "chrome/common/temp_scaffolding_stubs.h" #else +#include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/google_update_settings.h" #endif @@ -203,9 +204,6 @@ using base::TimeDelta; // Check to see that we're being called on only one thread. static bool IsSingleThreaded(); -static const char kMetricsURL[] = - "https://clients4.google.com/firefox/metrics/collect"; - static const char kMetricsType[] = "application/vnd.mozilla.metrics.bz2"; // The delay, in seconds, after startup before sending the first log message. @@ -595,6 +593,13 @@ void MetricsService::RecordBreakpadHasDebugger(bool has_debugger) { // Initialization methods void MetricsService::InitializeMetricsState() { +#if defined(OS_POSIX) + server_url_ = L"https://clients4.google.com/firefox/metrics/collect"; +#else + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + server_url_ = dist->GetStatsServerURL(); +#endif + PrefService* pref = g_browser_process->local_state(); DCHECK(pref); @@ -1150,7 +1155,8 @@ void MetricsService::PrepareFetchWithPendingLog() { return; } - current_fetch_.reset(new URLFetcher(GURL(kMetricsURL), URLFetcher::POST, + current_fetch_.reset(new URLFetcher(GURL(WideToUTF16(server_url_)), + URLFetcher::POST, this)); current_fetch_->set_request_context(Profile::GetDefaultRequestContext()); current_fetch_->set_upload_data(kMetricsType, compressed_log); @@ -1313,7 +1319,7 @@ void MetricsService::OnURLFetchComplete(const URLFetcher* source, void MetricsService::HandleBadResponseCode() { LOG(INFO) << "Verify your metrics logs are formatted correctly. " - "Verify server is active at " << kMetricsURL; + "Verify server is active at " << server_url_; if (!pending_log()) { LOG(INFO) << "METRICS: Recorder shutdown during log transmission."; } else { |