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

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

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 | Annotate | Revision Log
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_CHROME_NET_BENCHMARKING_MESSAGE_FILTER_H_ 5 #ifndef CHROME_BROWSER_CHROME_NET_BENCHMARKING_MESSAGE_FILTER_H_
6 #define CHROME_BROWSER_CHROME_NET_BENCHMARKING_MESSAGE_FILTER_H_ 6 #define CHROME_BROWSER_CHROME_NET_BENCHMARKING_MESSAGE_FILTER_H_
7 7
8 #include "content/public/browser/browser_message_filter.h" 8 #include "content/public/browser/browser_message_filter.h"
9 9
10 namespace net { 10 namespace net {
11 class URLRequestContextGetter; 11 class URLRequestContextGetter;
12 } 12 }
13 13
14 class Profile; 14 class Profile;
15 15
16 // This class filters out incoming Chrome-specific benchmarking IPC messages 16 // This class filters out incoming Chrome-specific benchmarking IPC messages
17 // for the renderer process on the IPC thread. 17 // for the renderer process on the IPC thread.
18 class ChromeNetBenchmarkingMessageFilter 18 class ChromeNetBenchmarkingMessageFilter
19 : public content::BrowserMessageFilter { 19 : public content::BrowserMessageFilter {
20 public: 20 public:
21 ChromeNetBenchmarkingMessageFilter( 21 ChromeNetBenchmarkingMessageFilter(
22 Profile* profile, 22 Profile* profile,
23 net::URLRequestContextGetter* request_context); 23 net::URLRequestContextGetter* request_context);
24 24
25 // content::BrowserMessageFilter methods: 25 // content::BrowserMessageFilter methods:
26 virtual bool OnMessageReceived(const IPC::Message& message, 26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
27 bool* message_was_ok) OVERRIDE;
28 27
29 private: 28 private:
30 virtual ~ChromeNetBenchmarkingMessageFilter(); 29 virtual ~ChromeNetBenchmarkingMessageFilter();
31 30
32 // Message handlers. 31 // Message handlers.
33 void OnCloseCurrentConnections(); 32 void OnCloseCurrentConnections();
34 void OnClearCache(IPC::Message* reply_msg); 33 void OnClearCache(IPC::Message* reply_msg);
35 void OnClearHostResolverCache(int* result); 34 void OnClearHostResolverCache(int* result);
36 void OnSetCacheMode(bool enabled); 35 void OnSetCacheMode(bool enabled);
37 void OnClearPredictorCache(int* result); 36 void OnClearPredictorCache(int* result);
38 37
39 // Returns true if benchmarking is enabled for chrome. 38 // Returns true if benchmarking is enabled for chrome.
40 bool CheckBenchmarkingEnabled() const; 39 bool CheckBenchmarkingEnabled() const;
41 40
42 // The Profile associated with our renderer process. This should only be 41 // The Profile associated with our renderer process. This should only be
43 // accessed on the UI thread! 42 // accessed on the UI thread!
44 Profile* profile_; 43 Profile* profile_;
45 scoped_refptr<net::URLRequestContextGetter> request_context_; 44 scoped_refptr<net::URLRequestContextGetter> request_context_;
46 45
47 DISALLOW_COPY_AND_ASSIGN(ChromeNetBenchmarkingMessageFilter); 46 DISALLOW_COPY_AND_ASSIGN(ChromeNetBenchmarkingMessageFilter);
48 }; 47 };
49 48
50 #endif // CHROME_BROWSER_CHROME_NET_BENCHMARKING_MESSAGE_FILTER_H_ 49 #endif // CHROME_BROWSER_CHROME_NET_BENCHMARKING_MESSAGE_FILTER_H_
51 50
OLDNEW
« no previous file with comments | « android_webview/browser/aw_content_browser_client.cc ('k') | chrome/browser/chrome_net_benchmarking_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698