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

Side by Side Diff: content/browser/resolve_proxy_msg_helper.cc

Issue 165333004: Revert "Allow MessageFilters to restrict listening to specific message classes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/resolve_proxy_msg_helper.h" 5 #include "content/browser/resolve_proxy_msg_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 #include "net/url_request/url_request_context.h" 12 #include "net/url_request/url_request_context.h"
13 #include "net/url_request/url_request_context_getter.h" 13 #include "net/url_request/url_request_context_getter.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 ResolveProxyMsgHelper::ResolveProxyMsgHelper( 17 ResolveProxyMsgHelper::ResolveProxyMsgHelper(
18 net::URLRequestContextGetter* getter) 18 net::URLRequestContextGetter* getter)
19 : BrowserMessageFilter(ViewMsgStart), 19 : context_getter_(getter),
20 context_getter_(getter),
21 proxy_service_(NULL) { 20 proxy_service_(NULL) {
22 } 21 }
23 22
24 ResolveProxyMsgHelper::ResolveProxyMsgHelper(net::ProxyService* proxy_service) 23 ResolveProxyMsgHelper::ResolveProxyMsgHelper(net::ProxyService* proxy_service)
25 : BrowserMessageFilter(ViewMsgStart), 24 : proxy_service_(proxy_service) {
26 proxy_service_(proxy_service) {
27 } 25 }
28 26
29 bool ResolveProxyMsgHelper::OnMessageReceived(const IPC::Message& message, 27 bool ResolveProxyMsgHelper::OnMessageReceived(const IPC::Message& message,
30 bool* message_was_ok) { 28 bool* message_was_ok) {
31 bool handled = true; 29 bool handled = true;
32 IPC_BEGIN_MESSAGE_MAP_EX(ResolveProxyMsgHelper, message, *message_was_ok) 30 IPC_BEGIN_MESSAGE_MAP_EX(ResolveProxyMsgHelper, message, *message_was_ok)
33 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ResolveProxy, OnResolveProxy) 31 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ResolveProxy, OnResolveProxy)
34 IPC_MESSAGE_UNHANDLED(handled = false) 32 IPC_MESSAGE_UNHANDLED(handled = false)
35 IPC_END_MESSAGE_MAP() 33 IPC_END_MESSAGE_MAP()
36 return handled; 34 return handled;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 base::Bind(&ResolveProxyMsgHelper::OnResolveProxyCompleted, 94 base::Bind(&ResolveProxyMsgHelper::OnResolveProxyCompleted,
97 base::Unretained(this)), 95 base::Unretained(this)),
98 &req.pac_req, net::BoundNetLog()); 96 &req.pac_req, net::BoundNetLog());
99 97
100 // Completed synchronously. 98 // Completed synchronously.
101 if (result != net::ERR_IO_PENDING) 99 if (result != net::ERR_IO_PENDING)
102 OnResolveProxyCompleted(result); 100 OnResolveProxyCompleted(result);
103 } 101 }
104 102
105 } // namespace content 103 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698