| 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 "webkit/support/simple_database_system.h" | 5 #include "webkit/support/simple_database_system.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
| 15 #include "base/threading/platform_thread.h" | 15 #include "base/threading/platform_thread.h" |
| 16 #include "third_party/WebKit/public/platform/WebString.h" | 16 #include "third_party/WebKit/public/platform/WebString.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" |
| 18 #include "third_party/sqlite/sqlite3.h" | 18 #include "third_party/sqlite/sqlite3.h" |
| 19 #include "webkit/browser/database/database_util.h" | 19 #include "webkit/browser/database/database_util.h" |
| 20 #include "webkit/browser/database/vfs_backend.h" | 20 #include "webkit/browser/database/vfs_backend.h" |
| 21 | 21 |
| 22 using webkit_database::DatabaseTracker; | 22 using webkit_database::DatabaseTracker; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 file_util::Delete(db_tracker_->DatabaseDirectory(), true); | 308 file_util::Delete(db_tracker_->DatabaseDirectory(), true); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void SimpleDatabaseSystem::ThreadCleanup(base::WaitableEvent* done_event) { | 311 void SimpleDatabaseSystem::ThreadCleanup(base::WaitableEvent* done_event) { |
| 312 ResetTracker(); | 312 ResetTracker(); |
| 313 db_tracker_->RemoveObserver(this); | 313 db_tracker_->RemoveObserver(this); |
| 314 db_tracker_ = NULL; | 314 db_tracker_ = NULL; |
| 315 done_event->Signal(); | 315 done_event->Signal(); |
| 316 } | 316 } |
| 317 | 317 |
| OLD | NEW |