OLD | NEW |
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 #include "content/common/web_database_observer_impl.h" | 5 #include "content/common/web_database_observer_impl.h" |
6 | 6 |
7 #include "base/string16.h" | 7 #include "base/string16.h" |
8 #include "content/common/database_messages.h" | 8 #include "content/common/database_messages.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
11 | 11 |
12 WebDatabaseObserverImpl::WebDatabaseObserverImpl( | 12 WebDatabaseObserverImpl::WebDatabaseObserverImpl( |
13 IPC::Message::Sender* sender) | 13 IPC::Message::Sender* sender) |
14 : sender_(sender), | 14 : sender_(sender), |
15 open_connections_(new webkit_database::DatabaseConnectionsWrapper) { | 15 open_connections_(new webkit_database::DatabaseConnectionsWrapper) { |
16 } | 16 } |
17 | 17 |
18 WebDatabaseObserverImpl::~WebDatabaseObserverImpl() { | 18 WebDatabaseObserverImpl::~WebDatabaseObserverImpl() { |
19 } | 19 } |
20 | 20 |
(...skipping 18 matching lines...) Expand all Loading... |
39 string16 origin_identifier = database.securityOrigin().databaseIdentifier(); | 39 string16 origin_identifier = database.securityOrigin().databaseIdentifier(); |
40 string16 database_name = database.name(); | 40 string16 database_name = database.name(); |
41 sender_->Send(new DatabaseHostMsg_Closed( | 41 sender_->Send(new DatabaseHostMsg_Closed( |
42 origin_identifier, database_name)); | 42 origin_identifier, database_name)); |
43 open_connections_->RemoveOpenConnection(origin_identifier, database_name); | 43 open_connections_->RemoveOpenConnection(origin_identifier, database_name); |
44 } | 44 } |
45 | 45 |
46 void WebDatabaseObserverImpl::WaitForAllDatabasesToClose() { | 46 void WebDatabaseObserverImpl::WaitForAllDatabasesToClose() { |
47 open_connections_->WaitForAllDatabasesToClose(); | 47 open_connections_->WaitForAllDatabasesToClose(); |
48 } | 48 } |
OLD | NEW |