| Index: chrome/browser/in_process_webkit/indexed_db_context.cc
|
| diff --git a/chrome/browser/in_process_webkit/indexed_db_context.cc b/chrome/browser/in_process_webkit/indexed_db_context.cc
|
| index b05786109133455babb3e7fe4f4d680661635e9b..50dcd353318fc544cc9a80dcc12a2f3174ef2d58 100644
|
| --- a/chrome/browser/in_process_webkit/indexed_db_context.cc
|
| +++ b/chrome/browser/in_process_webkit/indexed_db_context.cc
|
| @@ -7,17 +7,14 @@
|
| #include "base/logging.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/in_process_webkit/webkit_context.h"
|
| -#include "googleurl/src/url_util.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebIDBDatabase.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h"
|
| -#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
| #include "webkit/glue/webkit_glue.h"
|
|
|
| using WebKit::WebIDBDatabase;
|
| using WebKit::WebIDBFactory;
|
| -using WebKit::WebSecurityOrigin;
|
|
|
| const FilePath::CharType IndexedDBContext::kIndexedDBDirectory[] =
|
| FILE_PATH_LITERAL("IndexedDB");
|
| @@ -40,39 +37,9 @@ WebIDBFactory* IndexedDBContext::GetIDBFactory() {
|
| }
|
|
|
| FilePath IndexedDBContext::GetIndexedDBFilePath(
|
| - const string16& database_name,
|
| - const WebSecurityOrigin& origin) const {
|
| + const string16& origin_id) const {
|
| FilePath storage_dir = webkit_context_->data_path().Append(
|
| kIndexedDBDirectory);
|
| - FilePath::StringType id = webkit_glue::WebStringToFilePathString(
|
| - WebIDBFactory::databaseFileName(database_name, origin));
|
| - return storage_dir.Append(id);
|
| -}
|
| -
|
| -// static
|
| -bool IndexedDBContext::SplitIndexedDBFileName(
|
| - const FilePath& file_name,
|
| - std::string* database_name,
|
| - WebSecurityOrigin* security_origin) {
|
| - FilePath::StringType base_name =
|
| - file_name.BaseName().RemoveExtension().value();
|
| - size_t db_name_separator = base_name.find(FILE_PATH_LITERAL("@"));
|
| - if (db_name_separator == FilePath::StringType::npos ||
|
| - db_name_separator == 0) {
|
| - return false;
|
| - }
|
| -
|
| - *security_origin =
|
| - WebSecurityOrigin::createFromDatabaseIdentifier(
|
| - webkit_glue::FilePathStringToWebString(
|
| - base_name.substr(0, db_name_separator)));
|
| -#if defined(OS_POSIX)
|
| - std::string name = base_name.substr(db_name_separator + 1);
|
| -#elif defined(OS_WIN)
|
| - std::string name = WideToUTF8(base_name.substr(db_name_separator + 1));
|
| -#endif
|
| - url_canon::RawCanonOutputT<char16> output;
|
| - url_util::DecodeURLEscapeSequences(name.c_str(), name.length(), &output);
|
| - *database_name = UTF16ToUTF8(string16(output.data(), output.length()));
|
| - return true;
|
| + FilePath::StringType id = webkit_glue::WebStringToFilePathString(origin_id);
|
| + return storage_dir.Append(id.append(kIndexedDBExtension));
|
| }
|
|
|