OLD | NEW |
---|---|
(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_IMPL_H_ | |
6 #define CHROME_BROWSER_NET_BENCHMARKING_IMPL_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 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.
| |
21 : public chrome::mojom::NetBenchmarking { | |
22 public: | |
23 NetBenchmarkingImpl( | |
24 Profile* profile, | |
25 net::URLRequestContextGetter* request_context); | |
26 ~NetBenchmarkingImpl() override; | |
27 | |
28 static void Create( | |
29 Profile* profile, | |
30 net::URLRequestContextGetter* request_context, | |
31 chrome::mojom::NetBenchmarkingRequest request); | |
32 static bool CheckBenchmarkingEnabled(); | |
33 | |
34 private: | |
35 // chrome:mojom:NetBenchmarking. | |
36 void CloseCurrentConnections( | |
37 const CloseCurrentConnectionsCallback& callback) override; | |
38 void ClearCache(const ClearCacheCallback& callback) override; | |
39 void ClearHostResolverCache() override; | |
40 void ClearPredictorCache() override; | |
41 | |
42 | |
43 // The Profile associated with our renderer process. This should only be | |
44 // accessed on the UI thread! | |
45 // TODO(623967): Store the Predictor* here instead of the Profile. | |
46 Profile* profile_; | |
47 scoped_refptr<net::URLRequestContextGetter> request_context_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(NetBenchmarkingImpl); | |
50 }; | |
51 | |
52 #endif // CHROME_BROWSER_NET_BENCHMARKING_IMPL_H_ | |
53 | |
OLD | NEW |