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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp

Issue 2818173003: Indexed DB: Remove nonstandard IDBFactory.webkitGetDatabaseNames() (Closed)
Patch Set: Remove content_browsertest for wGDN Created 3 years, 7 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: third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
index c2847e08d92dc97aa66ea911adc8558eda3f7814..81fc62b8a997d232de02e9fb380237c7055bd233 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
@@ -63,30 +63,9 @@ static bool IsContextValid(ExecutionContext* context) {
return true;
}
-IDBRequest* IDBFactory::getDatabaseNames(ScriptState* script_state,
- ExceptionState& exception_state) {
- IDB_TRACE("IDBFactory::getDatabaseNames");
- if (!IsContextValid(ExecutionContext::From(script_state)))
- return nullptr;
- if (!ExecutionContext::From(script_state)
- ->GetSecurityOrigin()
- ->CanAccessDatabase()) {
- exception_state.ThrowSecurityError(
- "access to the Indexed Database API is denied in this context.");
- return nullptr;
- }
-
+IDBRequest* IDBFactory::GetDatabaseNames(ScriptState* script_state) {
IDBRequest* request =
IDBRequest::Create(script_state, IDBAny::CreateNull(), nullptr);
-
- if (!IndexedDBClient::From(ExecutionContext::From(script_state))
- ->AllowIndexedDB(ExecutionContext::From(script_state),
- "Database Listing")) {
- request->EnqueueResponse(
- DOMException::Create(kUnknownError, kPermissionDeniedErrorMessage));
- return request;
- }
-
Platform::Current()->IdbFactory()->GetDatabaseNames(
request->CreateWebCallbacks().release(),
WebSecurityOrigin(
@@ -153,23 +132,6 @@ IDBOpenDBRequest* IDBFactory::open(ScriptState* script_state,
IDBOpenDBRequest* IDBFactory::deleteDatabase(ScriptState* script_state,
const String& name,
ExceptionState& exception_state) {
- return DeleteDatabaseInternal(script_state, name, exception_state,
- /*force_close=*/false);
-}
-
-IDBOpenDBRequest* IDBFactory::CloseConnectionsAndDeleteDatabase(
- ScriptState* script_state,
- const String& name,
- ExceptionState& exception_state) {
- return DeleteDatabaseInternal(script_state, name, exception_state,
- /*force_close=*/true);
-}
-
-IDBOpenDBRequest* IDBFactory::DeleteDatabaseInternal(
- ScriptState* script_state,
- const String& name,
- ExceptionState& exception_state,
- bool force_close) {
IDB_TRACE("IDBFactory::deleteDatabase");
IDBDatabase::RecordApiCallsHistogram(kIDBDeleteDatabaseCall);
if (!IsContextValid(ExecutionContext::From(script_state)))
@@ -182,6 +144,18 @@ IDBOpenDBRequest* IDBFactory::DeleteDatabaseInternal(
return nullptr;
}
+ return DeleteDatabaseInternal(script_state, name, /*force_close=*/false);
+}
+
+IDBOpenDBRequest* IDBFactory::CloseConnectionsAndDeleteDatabase(
+ ScriptState* script_state,
+ const String& name) {
+ return DeleteDatabaseInternal(script_state, name, /*force_close=*/true);
+}
+
+IDBOpenDBRequest* IDBFactory::DeleteDatabaseInternal(ScriptState* script_state,
+ const String& name,
+ bool force_close) {
IDBOpenDBRequest* request = IDBOpenDBRequest::Create(
script_state, nullptr, 0, IDBDatabaseMetadata::kDefaultVersion);
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBFactory.h ('k') | third_party/WebKit/Source/modules/indexeddb/IDBFactory.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698