Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: content/browser/indexed_db/indexed_db_unittest.cc

Issue 1757693002: Reduce use of DatabaseIdentifier in Indexed DB entry points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert change for ZIP file naming Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index 9ed1e738018f92999b411ec906697098a76de655..7b057d599cc9609d8c4591683b8e055b98ec0d54 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -23,7 +23,6 @@
#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"
namespace content {
@@ -78,10 +77,8 @@ TEST_F(IndexedDBTest, ClearSessionOnlyDatabases) {
quota_manager_proxy_.get(),
task_runner_.get());
- normal_path = idb_context->GetFilePathForTesting(
- storage::GetIdentifierFromOrigin(kNormalOrigin));
- session_only_path = idb_context->GetFilePathForTesting(
- storage::GetIdentifierFromOrigin(kSessionOnlyOrigin));
+ normal_path = idb_context->GetFilePathForTesting(kNormalOrigin);
+ session_only_path = idb_context->GetFilePathForTesting(kSessionOnlyOrigin);
ASSERT_TRUE(base::CreateDirectory(normal_path));
ASSERT_TRUE(base::CreateDirectory(session_only_path));
FlushIndexedDBTaskRunner();
@@ -116,10 +113,8 @@ TEST_F(IndexedDBTest, SetForceKeepSessionState) {
// Save session state. This should bypass the destruction-time deletion.
idb_context->SetForceKeepSessionState();
- normal_path = idb_context->GetFilePathForTesting(
- storage::GetIdentifierFromOrigin(kNormalOrigin));
- session_only_path = idb_context->GetFilePathForTesting(
- storage::GetIdentifierFromOrigin(kSessionOnlyOrigin));
+ normal_path = idb_context->GetFilePathForTesting(kNormalOrigin);
+ session_only_path = idb_context->GetFilePathForTesting(kSessionOnlyOrigin);
ASSERT_TRUE(base::CreateDirectory(normal_path));
ASSERT_TRUE(base::CreateDirectory(session_only_path));
message_loop_.RunUntilIdle();
@@ -192,8 +187,7 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) {
IndexedDBFactory* factory = idb_context->GetIDBFactory();
- test_path = idb_context->GetFilePathForTesting(
- storage::GetIdentifierFromOrigin(kTestOrigin));
+ test_path = idb_context->GetFilePathForTesting(kTestOrigin);
IndexedDBPendingConnection open_connection(open_callbacks,
open_db_callbacks,
@@ -243,8 +237,7 @@ TEST_F(IndexedDBTest, DeleteFailsIfDirectoryLocked) {
temp_dir.path(), special_storage_policy_.get(),
quota_manager_proxy_.get(), task_runner_.get());
- base::FilePath test_path = idb_context->GetFilePathForTesting(
- storage::GetIdentifierFromOrigin(kTestOrigin));
+ base::FilePath test_path = idb_context->GetFilePathForTesting(kTestOrigin);
ASSERT_TRUE(base::CreateDirectory(test_path));
scoped_ptr<LevelDBLock> lock =

Powered by Google App Engine
This is Rietveld 408576698