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

Side by Side Diff: chrome/browser/net_benchmarking.h

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NET_BENCHMARKING_H_ 5 #ifndef CHROME_BROWSER_NET_BENCHMARKING_H_
6 #define CHROME_BROWSER_NET_BENCHMARKING_H_ 6 #define CHROME_BROWSER_NET_BENCHMARKING_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/net_benchmarking.mojom.h" 10 #include "chrome/common/net_benchmarking.mojom.h"
11 #include "services/service_manager/public/cpp/bind_source_info.h"
11 12
12 namespace net { 13 namespace net {
13 class URLRequestContextGetter; 14 class URLRequestContextGetter;
14 } 15 }
15 16
16 class Profile; 17 class Profile;
17 18
18 // This class handles Chrome-specific benchmarking IPC messages 19 // This class handles Chrome-specific benchmarking IPC messages
19 // for the renderer process. 20 // for the renderer process.
20 class NetBenchmarking : public chrome::mojom::NetBenchmarking { 21 class NetBenchmarking : public chrome::mojom::NetBenchmarking {
21 public: 22 public:
22 NetBenchmarking(Profile* profile, 23 NetBenchmarking(Profile* profile,
23 net::URLRequestContextGetter* request_context); 24 net::URLRequestContextGetter* request_context);
24 ~NetBenchmarking() override; 25 ~NetBenchmarking() override;
25 26
26 static void Create(Profile* profile, 27 static void Create(Profile* profile,
27 net::URLRequestContextGetter* request_context, 28 net::URLRequestContextGetter* request_context,
29 const service_manager::BindSourceInfo& source_info,
28 chrome::mojom::NetBenchmarkingRequest request); 30 chrome::mojom::NetBenchmarkingRequest request);
29 static bool CheckBenchmarkingEnabled(); 31 static bool CheckBenchmarkingEnabled();
30 32
31 private: 33 private:
32 // chrome:mojom:NetBenchmarking. 34 // chrome:mojom:NetBenchmarking.
33 void CloseCurrentConnections( 35 void CloseCurrentConnections(
34 const CloseCurrentConnectionsCallback& callback) override; 36 const CloseCurrentConnectionsCallback& callback) override;
35 void ClearCache(const ClearCacheCallback& callback) override; 37 void ClearCache(const ClearCacheCallback& callback) override;
36 void ClearHostResolverCache( 38 void ClearHostResolverCache(
37 const ClearHostResolverCacheCallback& callback) override; 39 const ClearHostResolverCacheCallback& callback) override;
38 void ClearPredictorCache( 40 void ClearPredictorCache(
39 const ClearPredictorCacheCallback& callback) override; 41 const ClearPredictorCacheCallback& callback) override;
40 42
41 // The Profile associated with our renderer process. This should only be 43 // The Profile associated with our renderer process. This should only be
42 // accessed on the UI thread! 44 // accessed on the UI thread!
43 // TODO(623967): Store the Predictor* here instead of the Profile. 45 // TODO(623967): Store the Predictor* here instead of the Profile.
44 Profile* profile_; 46 Profile* profile_;
45 scoped_refptr<net::URLRequestContextGetter> request_context_; 47 scoped_refptr<net::URLRequestContextGetter> request_context_;
46 48
47 DISALLOW_COPY_AND_ASSIGN(NetBenchmarking); 49 DISALLOW_COPY_AND_ASSIGN(NetBenchmarking);
48 }; 50 };
49 51
50 #endif // CHROME_BROWSER_NET_BENCHMARKING_H_ 52 #endif // CHROME_BROWSER_NET_BENCHMARKING_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc ('k') | chrome/browser/net_benchmarking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698