summaryrefslogtreecommitdiffstats
path: root/webkit/dom_storage
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-02 05:12:33 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-02 05:12:33 +0000
commita3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e (patch)
treebdd4dac76e6034ef6cf33450e203269a715ea0e6 /webkit/dom_storage
parent8bc574c57115e9ffd0169f33131c0865997dcb35 (diff)
downloadchromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.zip
chromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.tar.gz
chromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.tar.bz2
Add FilePath to base namespace.
This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/dom_storage')
-rw-r--r--webkit/dom_storage/dom_storage_area.cc14
-rw-r--r--webkit/dom_storage/dom_storage_area.h10
-rw-r--r--webkit/dom_storage/dom_storage_area_unittest.cc24
-rw-r--r--webkit/dom_storage/dom_storage_context.cc10
-rw-r--r--webkit/dom_storage/dom_storage_context.h14
-rw-r--r--webkit/dom_storage/dom_storage_context_unittest.cc8
-rw-r--r--webkit/dom_storage/dom_storage_database.cc10
-rw-r--r--webkit/dom_storage/dom_storage_database.h8
-rw-r--r--webkit/dom_storage/dom_storage_database_unittest.cc10
-rw-r--r--webkit/dom_storage/dom_storage_namespace.cc2
-rw-r--r--webkit/dom_storage/dom_storage_namespace.h4
-rw-r--r--webkit/dom_storage/local_storage_database_adapter.cc2
-rw-r--r--webkit/dom_storage/local_storage_database_adapter.h4
-rw-r--r--webkit/dom_storage/session_storage_database.cc2
-rw-r--r--webkit/dom_storage/session_storage_database.h4
15 files changed, 64 insertions, 62 deletions
diff --git a/webkit/dom_storage/dom_storage_area.cc b/webkit/dom_storage/dom_storage_area.cc
index a0c8308..d707a3a 100644
--- a/webkit/dom_storage/dom_storage_area.cc
+++ b/webkit/dom_storage/dom_storage_area.cc
@@ -33,28 +33,28 @@ DomStorageArea::CommitBatch::~CommitBatch() {}
// static
-const FilePath::CharType DomStorageArea::kDatabaseFileExtension[] =
+const base::FilePath::CharType DomStorageArea::kDatabaseFileExtension[] =
FILE_PATH_LITERAL(".localstorage");
// static
-FilePath DomStorageArea::DatabaseFileNameFromOrigin(const GURL& origin) {
+base::FilePath DomStorageArea::DatabaseFileNameFromOrigin(const GURL& origin) {
std::string filename = fileapi::GetOriginIdentifierFromURL(origin);
- // There is no FilePath.AppendExtension() method, so start with just the
+ // There is no base::FilePath.AppendExtension() method, so start with just the
// extension as the filename, and then InsertBeforeExtension the desired
// name.
- return FilePath().Append(kDatabaseFileExtension).
+ return base::FilePath().Append(kDatabaseFileExtension).
InsertBeforeExtensionASCII(filename);
}
// static
-GURL DomStorageArea::OriginFromDatabaseFileName(const FilePath& name) {
+GURL DomStorageArea::OriginFromDatabaseFileName(const base::FilePath& name) {
DCHECK(name.MatchesExtension(kDatabaseFileExtension));
WebKit::WebString origin_id = webkit_base::FilePathToWebString(
name.BaseName().RemoveExtension());
return DatabaseUtil::GetOriginFromIdentifier(origin_id);
}
-DomStorageArea::DomStorageArea(const GURL& origin, const FilePath& directory,
+DomStorageArea::DomStorageArea(const GURL& origin, const base::FilePath& directory,
DomStorageTaskRunner* task_runner)
: namespace_id_(kLocalStorageNamespaceId), origin_(origin),
directory_(directory),
@@ -64,7 +64,7 @@ DomStorageArea::DomStorageArea(const GURL& origin, const FilePath& directory,
is_shutdown_(false),
commit_batches_in_flight_(0) {
if (!directory.empty()) {
- FilePath path = directory.Append(DatabaseFileNameFromOrigin(origin_));
+ base::FilePath path = directory.Append(DatabaseFileNameFromOrigin(origin_));
backing_.reset(new LocalStorageDatabaseAdapter(path));
is_initial_import_done_ = false;
}
diff --git a/webkit/dom_storage/dom_storage_area.h b/webkit/dom_storage/dom_storage_area.h
index 9a08acf..d9fbcae 100644
--- a/webkit/dom_storage/dom_storage_area.h
+++ b/webkit/dom_storage/dom_storage_area.h
@@ -29,13 +29,13 @@ class WEBKIT_STORAGE_EXPORT DomStorageArea
: public base::RefCountedThreadSafe<DomStorageArea> {
public:
- static const FilePath::CharType kDatabaseFileExtension[];
- static FilePath DatabaseFileNameFromOrigin(const GURL& origin);
- static GURL OriginFromDatabaseFileName(const FilePath& file_name);
+ static const base::FilePath::CharType kDatabaseFileExtension[];
+ static base::FilePath DatabaseFileNameFromOrigin(const GURL& origin);
+ static GURL OriginFromDatabaseFileName(const base::FilePath& file_name);
// Local storage. Backed on disk if directory is nonempty.
DomStorageArea(const GURL& origin,
- const FilePath& directory,
+ const base::FilePath& directory,
DomStorageTaskRunner* task_runner);
// Session storage. Backed on disk if |session_storage_backing| is not NULL.
@@ -119,7 +119,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageArea
int64 namespace_id_;
std::string persistent_namespace_id_;
GURL origin_;
- FilePath directory_;
+ base::FilePath directory_;
scoped_refptr<DomStorageTaskRunner> task_runner_;
scoped_refptr<DomStorageMap> map_;
scoped_ptr<DomStorageDatabaseAdapter> backing_;
diff --git a/webkit/dom_storage/dom_storage_area_unittest.cc b/webkit/dom_storage/dom_storage_area_unittest.cc
index 4513ea3..6667312 100644
--- a/webkit/dom_storage/dom_storage_area_unittest.cc
+++ b/webkit/dom_storage/dom_storage_area_unittest.cc
@@ -126,13 +126,13 @@ TEST_F(DomStorageAreaTest, BackingDatabaseOpened) {
const int64 kSessionStorageNamespaceId = kLocalStorageNamespaceId + 1;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- const FilePath kExpectedOriginFilePath = temp_dir.path().Append(
+ const base::FilePath kExpectedOriginFilePath = temp_dir.path().Append(
DomStorageArea::DatabaseFileNameFromOrigin(kOrigin));
// No directory, backing should be null.
{
scoped_refptr<DomStorageArea> area(
- new DomStorageArea(kOrigin, FilePath(), NULL));
+ new DomStorageArea(kOrigin, base::FilePath(), NULL));
EXPECT_EQ(NULL, area->backing_.get());
EXPECT_TRUE(area->is_initial_import_done_);
EXPECT_FALSE(file_util::PathExists(kExpectedOriginFilePath));
@@ -315,9 +315,9 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) {
new MockDomStorageTaskRunner(base::MessageLoopProxy::current())));
// This test puts files on disk.
- FilePath db_file_path = static_cast<LocalStorageDatabaseAdapter*>(
+ base::FilePath db_file_path = static_cast<LocalStorageDatabaseAdapter*>(
area->backing_.get())->db_->file_path();
- FilePath db_journal_file_path =
+ base::FilePath db_journal_file_path =
DomStorageDatabase::GetJournalFilePath(db_file_path);
// Nothing bad should happen when invoked w/o any files on disk.
@@ -443,9 +443,9 @@ TEST_F(DomStorageAreaTest, DatabaseFileNames) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kCases); ++i) {
GURL origin = GURL(kCases[i].origin).GetOrigin();
- FilePath file_name = FilePath().AppendASCII(kCases[i].file_name);
- FilePath journal_file_name =
- FilePath().AppendASCII(kCases[i].journal_file_name);
+ base::FilePath file_name = base::FilePath().AppendASCII(kCases[i].file_name);
+ base::FilePath journal_file_name =
+ base::FilePath().AppendASCII(kCases[i].journal_file_name);
EXPECT_EQ(file_name,
DomStorageArea::DatabaseFileNameFromOrigin(origin));
@@ -456,17 +456,17 @@ TEST_F(DomStorageAreaTest, DatabaseFileNames) {
}
// Also test some DomStorageDatabase::GetJournalFilePath cases here.
- FilePath parent = FilePath().AppendASCII("a").AppendASCII("b");
+ base::FilePath parent = base::FilePath().AppendASCII("a").AppendASCII("b");
EXPECT_EQ(
parent.AppendASCII("file-journal"),
DomStorageDatabase::GetJournalFilePath(parent.AppendASCII("file")));
EXPECT_EQ(
- FilePath().AppendASCII("-journal"),
- DomStorageDatabase::GetJournalFilePath(FilePath()));
+ base::FilePath().AppendASCII("-journal"),
+ DomStorageDatabase::GetJournalFilePath(base::FilePath()));
EXPECT_EQ(
- FilePath().AppendASCII(".extensiononly-journal"),
+ base::FilePath().AppendASCII(".extensiononly-journal"),
DomStorageDatabase::GetJournalFilePath(
- FilePath().AppendASCII(".extensiononly")));
+ base::FilePath().AppendASCII(".extensiononly")));
}
} // namespace dom_storage
diff --git a/webkit/dom_storage/dom_storage_context.cc b/webkit/dom_storage/dom_storage_context.cc
index 3d32243..45aae74 100644
--- a/webkit/dom_storage/dom_storage_context.cc
+++ b/webkit/dom_storage/dom_storage_context.cc
@@ -25,8 +25,8 @@ namespace dom_storage {
static const int kSessionStoraceScavengingSeconds = 60;
DomStorageContext::DomStorageContext(
- const FilePath& localstorage_directory,
- const FilePath& sessionstorage_directory,
+ const base::FilePath& localstorage_directory,
+ const base::FilePath& sessionstorage_directory,
quota::SpecialStoragePolicy* special_storage_policy,
DomStorageTaskRunner* task_runner)
: localstorage_directory_(localstorage_directory),
@@ -69,7 +69,7 @@ DomStorageNamespace* DomStorageContext::GetStorageNamespace(
if (!file_util::CreateDirectory(localstorage_directory_)) {
LOG(ERROR) << "Failed to create 'Local Storage' directory,"
" falling back to in-memory only.";
- localstorage_directory_ = FilePath();
+ localstorage_directory_ = base::FilePath();
}
}
DomStorageNamespace* local =
@@ -89,7 +89,7 @@ void DomStorageContext::GetLocalStorageUsage(
return;
FileEnumerator enumerator(localstorage_directory_, false,
FileEnumerator::FILES);
- for (FilePath path = enumerator.Next(); !path.empty();
+ for (base::FilePath path = enumerator.Next(); !path.empty();
path = enumerator.Next()) {
if (path.MatchesExtension(DomStorageArea::kDatabaseFileExtension)) {
LocalStorageUsageInfo info;
@@ -313,7 +313,7 @@ void DomStorageContext::ClearSessionOnlyOrigins() {
continue;
const bool kNotRecursive = false;
- FilePath database_file_path = localstorage_directory_.Append(
+ base::FilePath database_file_path = localstorage_directory_.Append(
DomStorageArea::DatabaseFileNameFromOrigin(origin));
file_util::Delete(database_file_path, kNotRecursive);
file_util::Delete(
diff --git a/webkit/dom_storage/dom_storage_context.h b/webkit/dom_storage/dom_storage_context.h
index 3b48833f..76a92b0 100644
--- a/webkit/dom_storage/dom_storage_context.h
+++ b/webkit/dom_storage/dom_storage_context.h
@@ -19,10 +19,10 @@
#include "googleurl/src/gurl.h"
#include "webkit/storage/webkit_storage_export.h"
-class FilePath;
class NullableString16;
namespace base {
+class FilePath;
class Time;
}
@@ -86,18 +86,18 @@ class WEBKIT_STORAGE_EXPORT DomStorageContext
};
DomStorageContext(
- const FilePath& localstorage_directory, // empty for incognito profiles
- const FilePath& sessionstorage_directory, // empty for incognito profiles
+ const base::FilePath& localstorage_directory, // empty for incognito profiles
+ const base::FilePath& sessionstorage_directory, // empty for incognito profiles
quota::SpecialStoragePolicy* special_storage_policy,
DomStorageTaskRunner* task_runner);
// Returns the directory path for localStorage, or an empty directory, if
// there is no backing on disk.
- const FilePath& localstorage_directory() { return localstorage_directory_; }
+ const base::FilePath& localstorage_directory() { return localstorage_directory_; }
// Returns the directory path for sessionStorage, or an empty directory, if
// there is no backing on disk.
- const FilePath& sessionstorage_directory() {
+ const base::FilePath& sessionstorage_directory() {
return sessionstorage_directory_;
}
@@ -190,12 +190,12 @@ class WEBKIT_STORAGE_EXPORT DomStorageContext
StorageNamespaceMap namespaces_;
// Where localstorage data is stored, maybe empty for the incognito use case.
- FilePath localstorage_directory_;
+ base::FilePath localstorage_directory_;
// Where sessionstorage data is stored, maybe empty for the incognito use
// case. Always empty until the file-backed session storage feature is
// implemented.
- FilePath sessionstorage_directory_;
+ base::FilePath sessionstorage_directory_;
// Used to schedule sequenced background tasks.
scoped_refptr<DomStorageTaskRunner> task_runner_;
diff --git a/webkit/dom_storage/dom_storage_context_unittest.cc b/webkit/dom_storage/dom_storage_context_unittest.cc
index 39e8252..f2bebc1 100644
--- a/webkit/dom_storage/dom_storage_context_unittest.cc
+++ b/webkit/dom_storage/dom_storage_context_unittest.cc
@@ -42,7 +42,7 @@ class DomStorageContextTest : public testing::Test {
task_runner_ = new MockDomStorageTaskRunner(
base::MessageLoopProxy::current());
context_ = new DomStorageContext(temp_dir_.path(),
- FilePath(),
+ base::FilePath(),
storage_policy_,
task_runner_);
}
@@ -54,7 +54,7 @@ class DomStorageContextTest : public testing::Test {
void VerifySingleOriginRemains(const GURL& origin) {
// Use a new instance to examine the contexts of temp_dir_.
scoped_refptr<DomStorageContext> context =
- new DomStorageContext(temp_dir_.path(), FilePath(), NULL, NULL);
+ new DomStorageContext(temp_dir_.path(), base::FilePath(), NULL, NULL);
std::vector<LocalStorageUsageInfo> infos;
context->GetLocalStorageUsage(&infos, kDontIncludeFileInfo);
ASSERT_EQ(1u, infos.size());
@@ -75,7 +75,7 @@ TEST_F(DomStorageContextTest, Basics) {
// initializes members properly and that invoking methods
// on a newly created object w/o any data on disk do no harm.
EXPECT_EQ(temp_dir_.path(), context_->localstorage_directory());
- EXPECT_EQ(FilePath(), context_->sessionstorage_directory());
+ EXPECT_EQ(base::FilePath(), context_->sessionstorage_directory());
EXPECT_EQ(storage_policy_.get(), context_->special_storage_policy_.get());
context_->PurgeMemory();
context_->DeleteLocalStorage(GURL("http://chromium.org/"));
@@ -108,7 +108,7 @@ TEST_F(DomStorageContextTest, UsageInfo) {
// Create a new context that points to the same directory, see that
// it knows about the origin that we stored data for.
- context_ = new DomStorageContext(temp_dir_.path(), FilePath(), NULL, NULL);
+ context_ = new DomStorageContext(temp_dir_.path(), base::FilePath(), NULL, NULL);
context_->GetLocalStorageUsage(&infos, kDontIncludeFileInfo);
EXPECT_EQ(1u, infos.size());
EXPECT_EQ(kOrigin, infos[0].origin);
diff --git a/webkit/dom_storage/dom_storage_database.cc b/webkit/dom_storage/dom_storage_database.cc
index 97fd3da..a49e93b 100644
--- a/webkit/dom_storage/dom_storage_database.cc
+++ b/webkit/dom_storage/dom_storage_database.cc
@@ -13,7 +13,7 @@
namespace {
-const FilePath::CharType kJournal[] = FILE_PATH_LITERAL("-journal");
+const base::FilePath::CharType kJournal[] = FILE_PATH_LITERAL("-journal");
class HistogramUniquifier {
public:
@@ -29,14 +29,14 @@ sql::ErrorDelegate* GetErrorHandlerForDomStorageDatabase() {
namespace dom_storage {
// static
-FilePath DomStorageDatabase::GetJournalFilePath(
- const FilePath& database_path) {
- FilePath::StringType journal_file_name =
+base::FilePath DomStorageDatabase::GetJournalFilePath(
+ const base::FilePath& database_path) {
+ base::FilePath::StringType journal_file_name =
database_path.BaseName().value() + kJournal;
return database_path.DirName().Append(journal_file_name);
}
-DomStorageDatabase::DomStorageDatabase(const FilePath& file_path)
+DomStorageDatabase::DomStorageDatabase(const base::FilePath& file_path)
: file_path_(file_path) {
// Note: in normal use we should never get an empty backing path here.
// However, the unit test for this class can contruct an instance
diff --git a/webkit/dom_storage/dom_storage_database.h b/webkit/dom_storage/dom_storage_database.h
index e6fd0db..e11a507 100644
--- a/webkit/dom_storage/dom_storage_database.h
+++ b/webkit/dom_storage/dom_storage_database.h
@@ -22,9 +22,9 @@ namespace dom_storage {
// class is designed to be used on a single thread.
class WEBKIT_STORAGE_EXPORT DomStorageDatabase {
public:
- static FilePath GetJournalFilePath(const FilePath& database_path);
+ static base::FilePath GetJournalFilePath(const base::FilePath& database_path);
- explicit DomStorageDatabase(const FilePath& file_path);
+ explicit DomStorageDatabase(const base::FilePath& file_path);
virtual ~DomStorageDatabase(); // virtual for unit testing
// Reads all the key, value pairs stored in the database and returns
@@ -41,7 +41,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageDatabase {
bool CommitChanges(bool clear_all_first, const ValuesMap& changes);
// Simple getter for the path we were constructed with.
- const FilePath& file_path() const { return file_path_; }
+ const base::FilePath& file_path() const { return file_path_; }
protected:
// Constructor that uses an in-memory sqlite database, for testing.
@@ -107,7 +107,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageDatabase {
void Init();
// Path to the database on disk.
- const FilePath file_path_;
+ const base::FilePath file_path_;
scoped_ptr<sql::Connection> db_;
bool failed_to_open_;
bool tried_to_recreate_;
diff --git a/webkit/dom_storage/dom_storage_database_unittest.cc b/webkit/dom_storage/dom_storage_database_unittest.cc
index 3e9bfbd..79f8afbf 100644
--- a/webkit/dom_storage/dom_storage_database_unittest.cc
+++ b/webkit/dom_storage/dom_storage_database_unittest.cc
@@ -110,7 +110,7 @@ TEST(DomStorageDatabaseTest, SimpleOpenAndClose) {
TEST(DomStorageDatabaseTest, CloseEmptyDatabaseDeletesFile) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
ValuesMap storage;
CreateMapWithValues(&storage);
@@ -167,7 +167,7 @@ TEST(DomStorageDatabaseTest, TestLazyOpenIsLazy) {
// open a file that already exists when only invoking ReadAllValues.
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
DomStorageDatabase db(file_name);
EXPECT_FALSE(db.IsOpen());
@@ -214,7 +214,7 @@ TEST(DomStorageDatabaseTest, TestLazyOpenUpgradesDatabase) {
// early if the database is already open).
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
DomStorageDatabase db(file_name);
db.db_.reset(new sql::Connection());
@@ -301,7 +301,7 @@ TEST(DomStorageDatabaseTest, TestSimpleRemoveOneValue) {
}
TEST(DomStorageDatabaseTest, TestCanOpenAndReadWebCoreDatabase) {
- FilePath webcore_database;
+ base::FilePath webcore_database;
PathService::Get(base::DIR_SOURCE_ROOT, &webcore_database);
webcore_database = webcore_database.AppendASCII("webkit");
webcore_database = webcore_database.AppendASCII("data");
@@ -334,7 +334,7 @@ TEST(DomStorageDatabaseTest, TestCanOpenFileThatIsNotADatabase) {
// Write into the temporary file first.
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
const char kData[] = "I am not a database.";
file_util::WriteFile(file_name, kData, strlen(kData));
diff --git a/webkit/dom_storage/dom_storage_namespace.cc b/webkit/dom_storage/dom_storage_namespace.cc
index ee91ca2..4c1cbd7 100644
--- a/webkit/dom_storage/dom_storage_namespace.cc
+++ b/webkit/dom_storage/dom_storage_namespace.cc
@@ -16,7 +16,7 @@
namespace dom_storage {
DomStorageNamespace::DomStorageNamespace(
- const FilePath& directory,
+ const base::FilePath& directory,
DomStorageTaskRunner* task_runner)
: namespace_id_(kLocalStorageNamespaceId),
directory_(directory),
diff --git a/webkit/dom_storage/dom_storage_namespace.h b/webkit/dom_storage/dom_storage_namespace.h
index e1c72f0..00439c0 100644
--- a/webkit/dom_storage/dom_storage_namespace.h
+++ b/webkit/dom_storage/dom_storage_namespace.h
@@ -27,7 +27,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageNamespace
public:
// Constructor for a LocalStorage namespace with id of 0
// and an optional backing directory on disk.
- DomStorageNamespace(const FilePath& directory, // may be empty
+ DomStorageNamespace(const base::FilePath& directory, // may be empty
DomStorageTaskRunner* task_runner);
// Constructor for a SessionStorage namespace with a non-zero id and an
@@ -83,7 +83,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageNamespace
int64 namespace_id_;
std::string persistent_namespace_id_;
- FilePath directory_;
+ base::FilePath directory_;
AreaMap areas_;
scoped_refptr<DomStorageTaskRunner> task_runner_;
scoped_refptr<SessionStorageDatabase> session_storage_database_;
diff --git a/webkit/dom_storage/local_storage_database_adapter.cc b/webkit/dom_storage/local_storage_database_adapter.cc
index 6e715d7..32f724f 100644
--- a/webkit/dom_storage/local_storage_database_adapter.cc
+++ b/webkit/dom_storage/local_storage_database_adapter.cc
@@ -10,7 +10,7 @@
namespace dom_storage {
LocalStorageDatabaseAdapter::LocalStorageDatabaseAdapter(
- const FilePath& path)
+ const base::FilePath& path)
: db_(new DomStorageDatabase(path)) {
}
diff --git a/webkit/dom_storage/local_storage_database_adapter.h b/webkit/dom_storage/local_storage_database_adapter.h
index f69e87b..e9e646b 100644
--- a/webkit/dom_storage/local_storage_database_adapter.h
+++ b/webkit/dom_storage/local_storage_database_adapter.h
@@ -10,7 +10,9 @@
#include "webkit/dom_storage/dom_storage_database_adapter.h"
#include "webkit/storage/webkit_storage_export.h"
+namespace base {
class FilePath;
+}
namespace dom_storage {
@@ -19,7 +21,7 @@ class DomStorageDatabase;
class WEBKIT_STORAGE_EXPORT LocalStorageDatabaseAdapter :
public DomStorageDatabaseAdapter {
public:
- explicit LocalStorageDatabaseAdapter(const FilePath& path);
+ explicit LocalStorageDatabaseAdapter(const base::FilePath& path);
virtual ~LocalStorageDatabaseAdapter();
virtual void ReadAllValues(ValuesMap* result) OVERRIDE;
virtual bool CommitChanges(bool clear_all_first,
diff --git a/webkit/dom_storage/session_storage_database.cc b/webkit/dom_storage/session_storage_database.cc
index 0f26f56..7944738 100644
--- a/webkit/dom_storage/session_storage_database.cc
+++ b/webkit/dom_storage/session_storage_database.cc
@@ -36,7 +36,7 @@
namespace dom_storage {
-SessionStorageDatabase::SessionStorageDatabase(const FilePath& file_path)
+SessionStorageDatabase::SessionStorageDatabase(const base::FilePath& file_path)
: file_path_(file_path),
db_error_(false),
is_inconsistent_(false) {
diff --git a/webkit/dom_storage/session_storage_database.h b/webkit/dom_storage/session_storage_database.h
index c9fc813..44ecb97 100644
--- a/webkit/dom_storage/session_storage_database.h
+++ b/webkit/dom_storage/session_storage_database.h
@@ -36,7 +36,7 @@ namespace dom_storage {
class WEBKIT_STORAGE_EXPORT SessionStorageDatabase :
public base::RefCountedThreadSafe<SessionStorageDatabase> {
public:
- explicit SessionStorageDatabase(const FilePath& file_path);
+ explicit SessionStorageDatabase(const base::FilePath& file_path);
// Reads the (key, value) pairs for |namespace_id| and |origin|. |result| is
// assumed to be empty and any duplicate keys will be overwritten. If the
@@ -187,7 +187,7 @@ class WEBKIT_STORAGE_EXPORT SessionStorageDatabase :
static const char* NextMapIdKey();
scoped_ptr<leveldb::DB> db_;
- FilePath file_path_;
+ base::FilePath file_path_;
// For protecting the database opening code.
base::Lock db_lock_;