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/browser/database/database_tracker.h" | 5 #include "webkit/browser/database/database_tracker.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/message_loop_proxy.h" | 13 #include "base/message_loop_proxy.h" |
14 #include "base/platform_file.h" | 14 #include "base/platform_file.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "sql/connection.h" | 18 #include "sql/connection.h" |
19 #include "sql/meta_table.h" | 19 #include "sql/meta_table.h" |
20 #include "sql/transaction.h" | 20 #include "sql/transaction.h" |
21 #include "third_party/sqlite/sqlite3.h" | 21 #include "third_party/sqlite/sqlite3.h" |
22 #include "webkit/base/origin_url_conversions.h" | 22 #include "webkit/base/origin_url_conversions.h" |
23 #include "webkit/browser/database/database_quota_client.h" | 23 #include "webkit/browser/database/database_quota_client.h" |
24 #include "webkit/browser/database/database_util.h" | 24 #include "webkit/browser/database/database_util.h" |
25 #include "webkit/browser/database/databases_table.h" | 25 #include "webkit/browser/database/databases_table.h" |
26 #include "webkit/quota/quota_manager.h" | 26 #include "webkit/browser/quota/quota_manager.h" |
27 #include "webkit/quota/special_storage_policy.h" | 27 #include "webkit/browser/quota/special_storage_policy.h" |
28 | 28 |
29 namespace webkit_database { | 29 namespace webkit_database { |
30 | 30 |
31 const base::FilePath::CharType kDatabaseDirectoryName[] = | 31 const base::FilePath::CharType kDatabaseDirectoryName[] = |
32 FILE_PATH_LITERAL("databases"); | 32 FILE_PATH_LITERAL("databases"); |
33 const base::FilePath::CharType kIncognitoDatabaseDirectoryName[] = | 33 const base::FilePath::CharType kIncognitoDatabaseDirectoryName[] = |
34 FILE_PATH_LITERAL("databases-incognito"); | 34 FILE_PATH_LITERAL("databases-incognito"); |
35 const base::FilePath::CharType kTrackerDatabaseFileName[] = | 35 const base::FilePath::CharType kTrackerDatabaseFileName[] = |
36 FILE_PATH_LITERAL("Databases.db"); | 36 FILE_PATH_LITERAL("Databases.db"); |
37 static const int kCurrentVersion = 2; | 37 static const int kCurrentVersion = 2; |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 if (!db_tracker_thread_->BelongsToCurrentThread()) { | 869 if (!db_tracker_thread_->BelongsToCurrentThread()) { |
870 db_tracker_thread_->PostTask( | 870 db_tracker_thread_->PostTask( |
871 FROM_HERE, | 871 FROM_HERE, |
872 base::Bind(&DatabaseTracker::SetForceKeepSessionState, this)); | 872 base::Bind(&DatabaseTracker::SetForceKeepSessionState, this)); |
873 return; | 873 return; |
874 } | 874 } |
875 force_keep_session_state_ = true; | 875 force_keep_session_state_ = true; |
876 } | 876 } |
877 | 877 |
878 } // namespace webkit_database | 878 } // namespace webkit_database |
OLD | NEW |