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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2011 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.
4
5 #ifndef CHROME_BROWSER_NET_BENCHMARKING_H_
6 #define CHROME_BROWSER_NET_BENCHMARKING_H_
7
8 #include "base/macros.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/net_benchmarking.mojom.h"
11
12 namespace net {
13 class URLRequestContextGetter;
14 }
15
16 class Profile;
17
18 // This class handles Chrome-specific benchmarking IPC messages
19 // for the renderer process.
20 class NetBenchmarking : public chrome::mojom::NetBenchmarking {
21 public:
22 NetBenchmarking(Profile* profile,
23 net::URLRequestContextGetter* request_context);
24 ~NetBenchmarking() override;
25
26 static void Create(Profile* profile,
27 net::URLRequestContextGetter* request_context,
28 chrome::mojom::NetBenchmarkingRequest request);
29 static bool CheckBenchmarkingEnabled();
30
31 private:
32 // chrome:mojom:NetBenchmarking.
33 void CloseCurrentConnections(
34 const CloseCurrentConnectionsCallback& callback) override;
35 void ClearCache(const ClearCacheCallback& callback) override;
36 void ClearHostResolverCache(
37 const ClearHostResolverCacheCallback& callback) override;
38 void ClearPredictorCache(
39 const ClearPredictorCacheCallback& callback) override;
40
41 // The Profile associated with our renderer process. This should only be
42 // accessed on the UI thread!
43 // TODO(623967): Store the Predictor* here instead of the Profile.
44 Profile* profile_;
45 scoped_refptr<net::URLRequestContextGetter> request_context_;
46
47 DISALLOW_COPY_AND_ASSIGN(NetBenchmarking);
48 };
49
50 #endif // CHROME_BROWSER_NET_BENCHMARKING_H_
OLDNEW
« 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