| 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_DATABASE_DATABASE_UTIL_H_ | 5 #ifndef WEBKIT_DATABASE_DATABASE_UTIL_H_ |
| 6 #define WEBKIT_DATABASE_DATABASE_UTIL_H_ | 6 #define WEBKIT_DATABASE_DATABASE_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "googleurl/src/gurl.h" |
| 10 | 11 |
| 11 namespace webkit_database { | 12 namespace webkit_database { |
| 12 | 13 |
| 13 class DatabaseTracker; | 14 class DatabaseTracker; |
| 14 | 15 |
| 15 class DatabaseUtil { | 16 class DatabaseUtil { |
| 16 public: | 17 public: |
| 17 // Extract various information from a database vfs_file_name. All return | 18 // Extract various information from a database vfs_file_name. All return |
| 18 // parameters are optional. | 19 // parameters are optional. |
| 19 static bool CrackVfsFileName(const string16& vfs_file_name, | 20 static bool CrackVfsFileName(const string16& vfs_file_name, |
| 20 string16* origin_identifier, | 21 string16* origin_identifier, |
| 21 string16* database_name, | 22 string16* database_name, |
| 22 string16* sqlite_suffix); | 23 string16* sqlite_suffix); |
| 23 static FilePath GetFullFilePathForVfsFile(DatabaseTracker* db_tracker, | 24 static FilePath GetFullFilePathForVfsFile(DatabaseTracker* db_tracker, |
| 24 const string16& vfs_file_name); | 25 const string16& vfs_file_name); |
| 25 | 26 static string16 GetOriginIdentifier(const GURL& url); |
| 26 }; | 27 }; |
| 27 | 28 |
| 28 } // namespace webkit_database | 29 } // namespace webkit_database |
| 29 | 30 |
| 30 #endif // WEBKIT_DATABASE_DATABASE_UTIL_H_ | 31 #endif // WEBKIT_DATABASE_DATABASE_UTIL_H_ |
| OLD | NEW |