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 #ifndef WEBKIT_BROWSER_DATABASE_DATABASE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_DATABASE_DATABASE_UTIL_H_ |
6 #define WEBKIT_BROWSER_DATABASE_DATABASE_UTIL_H_ | 6 #define WEBKIT_BROWSER_DATABASE_DATABASE_UTIL_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "webkit/storage/webkit_storage_export.h" | 10 #include "webkit/browser/webkit_storage_browser_export.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class FilePath; | 13 class FilePath; |
14 } | 14 } |
15 | 15 |
16 namespace webkit_database { | 16 namespace webkit_database { |
17 | 17 |
18 class DatabaseTracker; | 18 class DatabaseTracker; |
19 | 19 |
20 class WEBKIT_STORAGE_EXPORT DatabaseUtil { | 20 class WEBKIT_STORAGE_BROWSER_EXPORT DatabaseUtil { |
21 public: | 21 public: |
22 static const char kJournalFileSuffix[]; | 22 static const char kJournalFileSuffix[]; |
23 | 23 |
24 // Extract various information from a database vfs_file_name. All return | 24 // Extract various information from a database vfs_file_name. All return |
25 // parameters are optional. | 25 // parameters are optional. |
26 static bool CrackVfsFileName(const base::string16& vfs_file_name, | 26 static bool CrackVfsFileName(const base::string16& vfs_file_name, |
27 base::string16* origin_identifier, | 27 base::string16* origin_identifier, |
28 base::string16* database_name, | 28 base::string16* database_name, |
29 base::string16* sqlite_suffix); | 29 base::string16* sqlite_suffix); |
30 static base::FilePath GetFullFilePathForVfsFile( | 30 static base::FilePath GetFullFilePathForVfsFile( |
31 DatabaseTracker* db_tracker, | 31 DatabaseTracker* db_tracker, |
32 const base::string16& vfs_file_name); | 32 const base::string16& vfs_file_name); |
33 static bool IsValidOriginIdentifier(const base::string16& origin_identifier); | 33 static bool IsValidOriginIdentifier(const base::string16& origin_identifier); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace webkit_database | 36 } // namespace webkit_database |
37 | 37 |
38 #endif // WEBKIT_BROWSER_DATABASE_DATABASE_UTIL_H_ | 38 #endif // WEBKIT_BROWSER_DATABASE_DATABASE_UTIL_H_ |
OLD | NEW |