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 "chrome/browser/metrics/network_stats_uploader.h"
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/metrics/time_ticks_experiment_win.h"
9 #include "chrome/browser/net/network_stats.h"
10 #include "chrome/common/net/test_server_locations.h"
12 #if !defined(OS_POSIX)
13 #include "chrome/installer/util/browser_distribution.h"
16 NetworkStatsUploader::NetworkStatsUploader() {
18 network_stats_server_
= chrome_common_net::kEchoTestServerLocation
;
20 BrowserDistribution
* dist
= BrowserDistribution::GetDistribution();
21 network_stats_server_
= dist
->GetNetworkStatsServer();
25 NetworkStatsUploader::~NetworkStatsUploader() {
28 void NetworkStatsUploader::CollectAndReportNetworkStats() {
29 IOThread
* io_thread
= g_browser_process
->io_thread();
33 chrome_browser_net::CollectNetworkStats(network_stats_server_
, io_thread
);
35 chrome::CollectTimeTicksStats();