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

Unified Diff: components/metrics/net/network_metrics_provider.h

Issue 558873002: Moves NetworkMetricsProvider to //components/metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed asvitkine comments Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/net/DEPS ('k') | components/metrics/net/network_metrics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/net/network_metrics_provider.h
diff --git a/chrome/browser/metrics/network_metrics_provider.h b/components/metrics/net/network_metrics_provider.h
similarity index 83%
rename from chrome/browser/metrics/network_metrics_provider.h
rename to components/metrics/net/network_metrics_provider.h
index f6b4104f5a172f8e81ccbc19b5168bdf54754b86..43a0318635f553d3035d25ac9622aaf0e1cd0012 100644
--- a/chrome/browser/metrics/network_metrics_provider.h
+++ b/components/metrics/net/network_metrics_provider.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_METRICS_NETWORK_METRICS_PROVIDER_H_
-#define CHROME_BROWSER_METRICS_NETWORK_METRICS_PROVIDER_H_
+#ifndef COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_
+#define COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/metrics/wifi_access_point_info_provider.h"
#include "components/metrics/metrics_provider.h"
+#include "components/metrics/net/wifi_access_point_info_provider.h"
#include "components/metrics/proto/system_profile.pb.h"
#include "net/base/net_util.h"
#include "net/base/network_change_notifier.h"
@@ -20,7 +20,9 @@ class NetworkMetricsProvider
: public metrics::MetricsProvider,
public net::NetworkChangeNotifier::ConnectionTypeObserver {
public:
- NetworkMetricsProvider();
+ // Creates a NetworkMetricsProvider, where |io_task_runner| is used to post
+ // network info collection tasks.
+ explicit NetworkMetricsProvider(base::TaskRunner* io_task_runner);
virtual ~NetworkMetricsProvider();
private:
@@ -50,6 +52,9 @@ class NetworkMetricsProvider
const WifiAccessPointInfoProvider::WifiAccessPointInfo& info,
metrics::SystemProfileProto::Network* network_proto);
+ // Task runner used for blocking file I/O.
+ base::TaskRunner* io_task_runner_;
+
// True if |connection_type_| changed during the lifetime of the log.
bool connection_type_is_ambiguous_;
// The connection type according to net::NetworkChangeNotifier.
@@ -69,4 +74,4 @@ class NetworkMetricsProvider
DISALLOW_COPY_AND_ASSIGN(NetworkMetricsProvider);
};
-#endif // CHROME_BROWSER_METRICS_NETWORK_METRICS_PROVIDER_H_
+#endif // COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_
« no previous file with comments | « components/metrics/net/DEPS ('k') | components/metrics/net/network_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698