// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/file_util.h"
+#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/mock_special_storage_policy.h"
#include "content/public/test/test_browser_context.h"
+#include "storage/browser/quota/quota_manager.h"
+#include "storage/browser/quota/special_storage_policy.h"
+#include "storage/common/database/database_identifier.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/browser/quota/quota_manager.h"
-#include "webkit/browser/quota/special_storage_policy.h"
-#include "webkit/common/database/database_identifier.h"
namespace content {
// Create the scope which will ensure we run the destructor of the context
// which should trigger the clean up.
{
- scoped_refptr<IndexedDBContextImpl> idb_context = new IndexedDBContextImpl(
- temp_dir.path(), special_storage_policy_, NULL, task_runner_);
+ scoped_refptr<IndexedDBContextImpl> idb_context =
+ new IndexedDBContextImpl(temp_dir.path(),
+ special_storage_policy_.get(),
+ NULL,
+ task_runner_.get());
normal_path = idb_context->GetFilePathForTesting(
- webkit_database::GetIdentifierFromOrigin(kNormalOrigin));
+ storage::GetIdentifierFromOrigin(kNormalOrigin));
session_only_path = idb_context->GetFilePathForTesting(
- webkit_database::GetIdentifierFromOrigin(kSessionOnlyOrigin));
+ storage::GetIdentifierFromOrigin(kSessionOnlyOrigin));
ASSERT_TRUE(base::CreateDirectory(normal_path));
ASSERT_TRUE(base::CreateDirectory(session_only_path));
FlushIndexedDBTaskRunner();
{
// Create some indexedDB paths.
// With the levelDB backend, these are directories.
- scoped_refptr<IndexedDBContextImpl> idb_context = new IndexedDBContextImpl(
- temp_dir.path(), special_storage_policy_, NULL, task_runner_);
+ scoped_refptr<IndexedDBContextImpl> idb_context =
+ new IndexedDBContextImpl(temp_dir.path(),
+ special_storage_policy_.get(),
+ NULL,
+ task_runner_.get());
// Save session state. This should bypass the destruction-time deletion.
idb_context->SetForceKeepSessionState();
normal_path = idb_context->GetFilePathForTesting(
- webkit_database::GetIdentifierFromOrigin(kNormalOrigin));
+ storage::GetIdentifierFromOrigin(kNormalOrigin));
session_only_path = idb_context->GetFilePathForTesting(
- webkit_database::GetIdentifierFromOrigin(kSessionOnlyOrigin));
+ storage::GetIdentifierFromOrigin(kSessionOnlyOrigin));
ASSERT_TRUE(base::CreateDirectory(normal_path));
ASSERT_TRUE(base::CreateDirectory(session_only_path));
message_loop_.RunUntilIdle();
const GURL kTestOrigin("http://test/");
- scoped_refptr<IndexedDBContextImpl> idb_context = new IndexedDBContextImpl(
- temp_dir.path(), special_storage_policy_, NULL, task_runner_);
+ scoped_refptr<IndexedDBContextImpl> idb_context =
+ new IndexedDBContextImpl(temp_dir.path(),
+ special_storage_policy_.get(),
+ NULL,
+ task_runner_.get());
scoped_refptr<ForceCloseDBCallbacks> open_callbacks =
new ForceCloseDBCallbacks(idb_context, kTestOrigin);
IndexedDBFactory* factory = idb_context->GetIDBFactory();
test_path = idb_context->GetFilePathForTesting(
- webkit_database::GetIdentifierFromOrigin(kTestOrigin));
+ storage::GetIdentifierFromOrigin(kTestOrigin));
IndexedDBPendingConnection open_connection(open_callbacks,
open_db_callbacks,
const GURL kTestOrigin("http://test/");
scoped_refptr<IndexedDBContextImpl> idb_context = new IndexedDBContextImpl(
- temp_dir.path(), special_storage_policy_, NULL, task_runner_);
+ temp_dir.path(), special_storage_policy_.get(), NULL, task_runner_.get());
base::FilePath test_path = idb_context->GetFilePathForTesting(
- webkit_database::GetIdentifierFromOrigin(kTestOrigin));
+ storage::GetIdentifierFromOrigin(kTestOrigin));
ASSERT_TRUE(base::CreateDirectory(test_path));
scoped_ptr<LevelDBLock> lock =
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
scoped_refptr<IndexedDBContextImpl> context = new IndexedDBContextImpl(
- temp_dir.path(), special_storage_policy_, NULL, task_runner_);
+ temp_dir.path(), special_storage_policy_.get(), NULL, task_runner_.get());
scoped_refptr<IndexedDBFactoryImpl> factory =
static_cast<IndexedDBFactoryImpl*>(context->GetIDBFactory());