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

Side by Side Diff: content/browser/appcache/appcache_dispatcher_host.cc

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 2 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) 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/appcache/appcache_dispatcher_host.h" 5 #include "content/browser/appcache/appcache_dispatcher_host.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 "content/browser/appcache/chrome_appcache_service.h" 9 #include "content/browser/appcache/chrome_appcache_service.h"
10 #include "content/common/appcache_messages.h" 10 #include "content/common/appcache_messages.h"
11 #include "content/public/browser/user_metrics.h" 11 #include "content/public/browser/user_metrics.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 AppCacheDispatcherHost::AppCacheDispatcherHost( 15 AppCacheDispatcherHost::AppCacheDispatcherHost(
16 ChromeAppCacheService* appcache_service, 16 ChromeAppCacheService* appcache_service,
17 int process_id) 17 int process_id)
18 : appcache_service_(appcache_service), 18 : appcache_service_(appcache_service),
19 frontend_proxy_(this), 19 frontend_proxy_(this),
20 process_id_(process_id) { 20 process_id_(process_id) {
21 } 21 }
22 22
23 void AppCacheDispatcherHost::OnChannelConnected(int32 peer_pid) { 23 void AppCacheDispatcherHost::OnChannelConnected(int32 peer_pid) {
24 BrowserMessageFilter::OnChannelConnected(peer_pid);
25 if (appcache_service_.get()) { 24 if (appcache_service_.get()) {
26 backend_impl_.Initialize( 25 backend_impl_.Initialize(
27 appcache_service_.get(), &frontend_proxy_, process_id_); 26 appcache_service_.get(), &frontend_proxy_, process_id_);
28 get_status_callback_ = 27 get_status_callback_ =
29 base::Bind(&AppCacheDispatcherHost::GetStatusCallback, 28 base::Bind(&AppCacheDispatcherHost::GetStatusCallback,
30 base::Unretained(this)); 29 base::Unretained(this));
31 start_update_callback_ = 30 start_update_callback_ =
32 base::Bind(&AppCacheDispatcherHost::StartUpdateCallback, 31 base::Bind(&AppCacheDispatcherHost::StartUpdateCallback,
33 base::Unretained(this)); 32 base::Unretained(this));
34 swap_cache_callback_ = 33 swap_cache_callback_ =
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 220 }
222 221
223 void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) { 222 void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) {
224 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); 223 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param);
225 DCHECK_EQ(pending_reply_msg_.get(), reply_msg); 224 DCHECK_EQ(pending_reply_msg_.get(), reply_msg);
226 AppCacheHostMsg_SwapCache::WriteReplyParams(reply_msg, result); 225 AppCacheHostMsg_SwapCache::WriteReplyParams(reply_msg, result);
227 Send(pending_reply_msg_.release()); 226 Send(pending_reply_msg_.release());
228 } 227 }
229 228
230 } // namespace content 229 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | content/browser/browser_child_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698