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

Side by Side Diff: content/browser/indexed_db/indexed_db_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/indexed_db/indexed_db_dispatcher_host.h" 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/process/process.h" 10 #include "base/process/process.h"
(...skipping 26 matching lines...) Expand all
37 : indexed_db_context_(indexed_db_context), 37 : indexed_db_context_(indexed_db_context),
38 database_dispatcher_host_(new DatabaseDispatcherHost(this)), 38 database_dispatcher_host_(new DatabaseDispatcherHost(this)),
39 cursor_dispatcher_host_(new CursorDispatcherHost(this)), 39 cursor_dispatcher_host_(new CursorDispatcherHost(this)),
40 ipc_process_id_(ipc_process_id) { 40 ipc_process_id_(ipc_process_id) {
41 DCHECK(indexed_db_context_); 41 DCHECK(indexed_db_context_);
42 } 42 }
43 43
44 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {} 44 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {}
45 45
46 void IndexedDBDispatcherHost::OnChannelClosing() { 46 void IndexedDBDispatcherHost::OnChannelClosing() {
47 BrowserMessageFilter::OnChannelClosing();
48
49 bool success = indexed_db_context_->TaskRunner()->PostTask( 47 bool success = indexed_db_context_->TaskRunner()->PostTask(
50 FROM_HERE, 48 FROM_HERE,
51 base::Bind(&IndexedDBDispatcherHost::ResetDispatcherHosts, this)); 49 base::Bind(&IndexedDBDispatcherHost::ResetDispatcherHosts, this));
52 50
53 if (!success) 51 if (!success)
54 ResetDispatcherHosts(); 52 ResetDispatcherHosts();
55 } 53 }
56 54
57 void IndexedDBDispatcherHost::OnDestruct() const { 55 void IndexedDBDispatcherHost::OnDestruct() const {
58 // The last reference to the dispatcher may be a posted task, which would 56 // The last reference to the dispatcher may be a posted task, which would
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 859 }
862 860
863 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( 861 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed(
864 int32 ipc_object_id) { 862 int32 ipc_object_id) {
865 DCHECK( 863 DCHECK(
866 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 864 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
867 parent_->DestroyObject(&map_, ipc_object_id); 865 parent_->DestroyObject(&map_, ipc_object_id);
868 } 866 }
869 867
870 } // namespace content 868 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/histogram_message_filter.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698