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

Unified Diff: chrome/browser/net_benchmarking.h

Issue 2521823008: Migrate chrome_net_benchmarking_message_filter to mojo (Closed)
Patch Set: Do not add NetBenchmaring interface if benchmarking is disabled Created 4 years 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 | « chrome/browser/chrome_net_benchmarking_message_filter.cc ('k') | chrome/browser/net_benchmarking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net_benchmarking.h
diff --git a/chrome/browser/net_benchmarking.h b/chrome/browser/net_benchmarking.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac990c3a2522c01143dd381ab364e02bb011b0bb
--- /dev/null
+++ b/chrome/browser/net_benchmarking.h
@@ -0,0 +1,50 @@
+// 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_H_
+#define CHROME_BROWSER_NET_BENCHMARKING_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 NetBenchmarking : public chrome::mojom::NetBenchmarking {
+ public:
+ NetBenchmarking(Profile* profile,
+ net::URLRequestContextGetter* request_context);
+ ~NetBenchmarking() 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(
+ const ClearHostResolverCacheCallback& callback) override;
+ void ClearPredictorCache(
+ const ClearPredictorCacheCallback& callback) 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(NetBenchmarking);
+};
+
+#endif // CHROME_BROWSER_NET_BENCHMARKING_H_
« no previous file with comments | « chrome/browser/chrome_net_benchmarking_message_filter.cc ('k') | chrome/browser/net_benchmarking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698