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