| 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/browser/renderer_host/database_message_filter.h" | 5 #include "content/browser/renderer_host/database_message_filter.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "content/browser/user_metrics.h" | 14 #include "content/browser/user_metrics.h" |
| 15 #include "content/common/database_messages.h" | 15 #include "content/common/database_messages.h" |
| 16 #include "content/public/common/result_codes.h" | 16 #include "content/public/common/result_codes.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "third_party/sqlite/sqlite3.h" | 18 #include "third_party/sqlite/sqlite3.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
| 20 #include "webkit/database/database_util.h" | 20 #include "webkit/database/database_util.h" |
| 21 #include "webkit/database/vfs_backend.h" | 21 #include "webkit/database/vfs_backend.h" |
| 22 #include "webkit/quota/quota_manager.h" | 22 #include "webkit/quota/quota_manager.h" |
| 23 | 23 |
| 24 #if defined(OS_POSIX) | 24 #if defined(OS_POSIX) |
| 25 #include "base/file_descriptor_posix.h" | 25 #include "base/file_descriptor_posix.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 using content::BrowserThread; |
| 28 using quota::QuotaManager; | 29 using quota::QuotaManager; |
| 29 using quota::QuotaManagerProxy; | 30 using quota::QuotaManagerProxy; |
| 30 using quota::QuotaStatusCode; | 31 using quota::QuotaStatusCode; |
| 31 using WebKit::WebSecurityOrigin; | 32 using WebKit::WebSecurityOrigin; |
| 32 using webkit_database::DatabaseTracker; | 33 using webkit_database::DatabaseTracker; |
| 33 using webkit_database::DatabaseUtil; | 34 using webkit_database::DatabaseUtil; |
| 34 using webkit_database::VfsBackend; | 35 using webkit_database::VfsBackend; |
| 35 | 36 |
| 36 namespace { | 37 namespace { |
| 37 | 38 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 database_size)); | 332 database_size)); |
| 332 } | 333 } |
| 333 } | 334 } |
| 334 | 335 |
| 335 void DatabaseMessageFilter::OnDatabaseScheduledForDeletion( | 336 void DatabaseMessageFilter::OnDatabaseScheduledForDeletion( |
| 336 const string16& origin_identifier, | 337 const string16& origin_identifier, |
| 337 const string16& database_name) { | 338 const string16& database_name) { |
| 338 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 339 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 339 Send(new DatabaseMsg_CloseImmediately(origin_identifier, database_name)); | 340 Send(new DatabaseMsg_CloseImmediately(origin_identifier, database_name)); |
| 340 } | 341 } |
| OLD | NEW |