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