OLD | NEW |
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/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 database_dispatcher_host_(new DatabaseDispatcherHost(this)), | 65 database_dispatcher_host_(new DatabaseDispatcherHost(this)), |
66 cursor_dispatcher_host_(new CursorDispatcherHost(this)), | 66 cursor_dispatcher_host_(new CursorDispatcherHost(this)), |
67 ipc_process_id_(ipc_process_id) { | 67 ipc_process_id_(ipc_process_id) { |
68 DCHECK(indexed_db_context_); | 68 DCHECK(indexed_db_context_); |
69 } | 69 } |
70 | 70 |
71 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() { | 71 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() { |
72 STLDeleteValues(&blob_data_handle_map_); | 72 STLDeleteValues(&blob_data_handle_map_); |
73 } | 73 } |
74 | 74 |
75 void IndexedDBDispatcherHost::OnChannelConnected(int32 peer_pid) { | 75 void IndexedDBDispatcherHost::OnSenderConnected() { |
76 BrowserMessageFilter::OnChannelConnected(peer_pid); | 76 BrowserMessageFilter::OnSenderConnected(); |
77 | 77 |
78 if (request_context_getter_.get()) { | 78 if (request_context_getter_.get()) { |
79 DCHECK(!request_context_); | 79 DCHECK(!request_context_); |
80 request_context_ = request_context_getter_->GetURLRequestContext(); | 80 request_context_ = request_context_getter_->GetURLRequestContext(); |
81 request_context_getter_ = NULL; | 81 request_context_getter_ = NULL; |
82 DCHECK(request_context_); | 82 DCHECK(request_context_); |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 void IndexedDBDispatcherHost::OnChannelClosing() { | 86 void IndexedDBDispatcherHost::OnSenderClosing() { |
87 bool success = indexed_db_context_->TaskRunner()->PostTask( | 87 bool success = indexed_db_context_->TaskRunner()->PostTask( |
88 FROM_HERE, | 88 FROM_HERE, |
89 base::Bind(&IndexedDBDispatcherHost::ResetDispatcherHosts, this)); | 89 base::Bind(&IndexedDBDispatcherHost::ResetDispatcherHosts, this)); |
90 | 90 |
91 if (!success) | 91 if (!success) |
92 ResetDispatcherHosts(); | 92 ResetDispatcherHosts(); |
93 } | 93 } |
94 | 94 |
95 void IndexedDBDispatcherHost::OnDestruct() const { | 95 void IndexedDBDispatcherHost::OnDestruct() const { |
96 // The last reference to the dispatcher may be a posted task, which would | 96 // The last reference to the dispatcher may be a posted task, which would |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 } | 975 } |
976 | 976 |
977 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( | 977 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( |
978 int32 ipc_object_id) { | 978 int32 ipc_object_id) { |
979 DCHECK( | 979 DCHECK( |
980 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); | 980 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |
981 parent_->DestroyObject(&map_, ipc_object_id); | 981 parent_->DestroyObject(&map_, ipc_object_id); |
982 } | 982 } |
983 | 983 |
984 } // namespace content | 984 } // namespace content |
OLD | NEW |