Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/database_dispatcher_host.h" | 5 #include "chrome/browser/renderer_host/database_dispatcher_host.h" |
| 6 | 6 |
| 7 #if defined(OS_POSIX) | 7 #include <string> |
| 8 #include "base/file_descriptor_posix.h" | |
| 9 #endif | |
| 10 | 8 |
| 11 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 12 #include "base/thread.h" | 10 #include "base/thread.h" |
| 13 #include "chrome/browser/browser_process.h" | |
| 14 #include "chrome/browser/browser_thread.h" | 11 #include "chrome/browser/browser_thread.h" |
| 15 #include "chrome/browser/content_settings/host_content_settings_map.h" | 12 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 16 #include "chrome/browser/net/chrome_url_request_context.h" | 13 #include "chrome/browser/net/chrome_url_request_context.h" |
| 17 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 14 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
| 18 #include "chrome/common/render_messages.h" | 15 #include "chrome/common/render_messages.h" |
| 19 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 20 #include "third_party/sqlite/sqlite3.h" | 17 #include "third_party/sqlite/sqlite3.h" |
| 21 #include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" | 18 #include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" |
| 22 #include "webkit/database/database_util.h" | 19 #include "webkit/database/database_util.h" |
| 23 #include "webkit/database/vfs_backend.h" | 20 #include "webkit/database/vfs_backend.h" |
| 24 | 21 |
| 22 #if defined(OS_POSIX) | |
|
James Hawkins
2010/12/05 17:58:47
#ifdef includes should be inline with the rest of
| |
| 23 #include "base/file_descriptor_posix.h" | |
| 24 #endif | |
| 25 | |
| 25 using WebKit::WebSecurityOrigin; | 26 using WebKit::WebSecurityOrigin; |
| 26 using webkit_database::DatabaseTracker; | 27 using webkit_database::DatabaseTracker; |
| 27 using webkit_database::DatabaseUtil; | 28 using webkit_database::DatabaseUtil; |
| 28 using webkit_database::VfsBackend; | 29 using webkit_database::VfsBackend; |
| 29 | 30 |
| 30 const int kNumDeleteRetries = 2; | 31 const int kNumDeleteRetries = 2; |
| 31 const int kDelayDeleteRetryMs = 100; | 32 const int kDelayDeleteRetryMs = 100; |
| 32 | 33 |
| 33 DatabaseDispatcherHost::DatabaseDispatcherHost( | 34 DatabaseDispatcherHost::DatabaseDispatcherHost( |
| 34 DatabaseTracker* db_tracker, | 35 DatabaseTracker* db_tracker, |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 database_size, space_available)); | 429 database_size, space_available)); |
| 429 } | 430 } |
| 430 } | 431 } |
| 431 | 432 |
| 432 void DatabaseDispatcherHost::OnDatabaseScheduledForDeletion( | 433 void DatabaseDispatcherHost::OnDatabaseScheduledForDeletion( |
| 433 const string16& origin_identifier, | 434 const string16& origin_identifier, |
| 434 const string16& database_name) { | 435 const string16& database_name) { |
| 435 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 436 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 436 Send(new ViewMsg_DatabaseCloseImmediately(origin_identifier, database_name)); | 437 Send(new ViewMsg_DatabaseCloseImmediately(origin_identifier, database_name)); |
| 437 } | 438 } |
| OLD | NEW |