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

Unified Diff: chrome/browser/metrics/network_quality_estimator_provider_impl.h

Issue 2605553002: Add EffectiveConnectionType enum to the system profile proto (Closed)
Patch Set: asvitkine comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/network_quality_estimator_provider_impl.h
diff --git a/chrome/browser/metrics/network_quality_estimator_provider_impl.h b/chrome/browser/metrics/network_quality_estimator_provider_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..d882b5a92485876783d60fd7cc2b91aeea01803a
--- /dev/null
+++ b/chrome/browser/metrics/network_quality_estimator_provider_impl.h
@@ -0,0 +1,42 @@
+// Copyright 2017 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.
+
+#ifndef CHROME_BROWSER_METRICS_NETWORK_QUALITY_ESTIMATOR_PROVIDER_IMPL_H_
+#define CHROME_BROWSER_METRICS_NETWORK_QUALITY_ESTIMATOR_PROVIDER_IMPL_H_
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/threading/thread_checker.h"
+#include "components/metrics/net/network_metrics_provider.h"
+
+class IOThread;
+
+namespace metrics {
+
+// Implements NetworkMetricsProvider::NetworkQualityEstimatorProvider. Provides
+// NetworkQualityEstimator by querying the IOThread.
+class NetworkQualityEstimatorProviderImpl
+ : public NetworkMetricsProvider::NetworkQualityEstimatorProvider {
+ public:
+ explicit NetworkQualityEstimatorProviderImpl(IOThread* io_thread);
+ ~NetworkQualityEstimatorProviderImpl() override;
+
+ private:
+ // NetworkMetricsProvider::NetworkQualityEstimatorProvider implementation:
Alexei Svitkine (slow) 2017/01/04 20:54:21 Nit: For new code, I think this comment syntax is
tbansal1 2017/01/04 21:24:19 Done.
+ scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() override;
+
Alexei Svitkine (slow) 2017/01/04 20:54:21 Nit: Remove blank line.
tbansal1 2017/01/04 21:24:19 Done.
+ void ProvideEstimator(
+ const base::Callback<void(net::NetworkQualityEstimator*)>& callback)
+ override;
+
+ IOThread* io_thread_;
+
+ base::ThreadChecker thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorProviderImpl);
+};
+
+} // namespace metrics
+
+#endif // CHROME_BROWSER_METRICS_NETWORK_QUALITY_ESTIMATOR_PROVIDER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698