Index: chrome/browser/net_benchmarking_impl.h |
diff --git a/chrome/browser/net_benchmarking_impl.h b/chrome/browser/net_benchmarking_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..41e140dc06013a1b626ad2b0ab9140b0ce14a868 |
--- /dev/null |
+++ b/chrome/browser/net_benchmarking_impl.h |
@@ -0,0 +1,53 @@ |
+// Copyright (c) 2011 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_NET_BENCHMARKING_IMPL_H_ |
+#define CHROME_BROWSER_NET_BENCHMARKING_IMPL_H_ |
+ |
+#include "base/macros.h" |
+#include "chrome/browser/profiles/profile.h" |
+#include "chrome/common/net_benchmarking.mojom.h" |
+ |
+namespace net { |
+class URLRequestContextGetter; |
+} |
+ |
+class Profile; |
+ |
+// This class handles Chrome-specific benchmarking IPC messages |
+// for the renderer process. |
+class NetBenchmarkingImpl |
Sam McNally
2016/12/08 22:57:46
Please run git cl format.
dvallet
2016/12/12 22:04:37
Done, that's handy thanks.
|
+ : public chrome::mojom::NetBenchmarking { |
+ public: |
+ NetBenchmarkingImpl( |
+ Profile* profile, |
+ net::URLRequestContextGetter* request_context); |
+ ~NetBenchmarkingImpl() override; |
+ |
+ static void Create( |
+ Profile* profile, |
+ net::URLRequestContextGetter* request_context, |
+ chrome::mojom::NetBenchmarkingRequest request); |
+ static bool CheckBenchmarkingEnabled(); |
+ |
+ private: |
+ // chrome:mojom:NetBenchmarking. |
+ void CloseCurrentConnections( |
+ const CloseCurrentConnectionsCallback& callback) override; |
+ void ClearCache(const ClearCacheCallback& callback) override; |
+ void ClearHostResolverCache() override; |
+ void ClearPredictorCache() override; |
+ |
+ |
+ // The Profile associated with our renderer process. This should only be |
+ // accessed on the UI thread! |
+ // TODO(623967): Store the Predictor* here instead of the Profile. |
+ Profile* profile_; |
+ scoped_refptr<net::URLRequestContextGetter> request_context_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NetBenchmarkingImpl); |
+}; |
+ |
+#endif // CHROME_BROWSER_NET_BENCHMARKING_IMPL_H_ |
+ |