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

Unified Diff: content/common/indexed_db/indexed_db_dispatcher.cc

Issue 9368053: Move indexed db files from content/renderer to content/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneccesary include Created 8 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/common/indexed_db/indexed_db_dispatcher.cc
diff --git a/content/renderer/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
similarity index 95%
rename from content/renderer/indexed_db/indexed_db_dispatcher.cc
rename to content/common/indexed_db/indexed_db_dispatcher.cc
index 2770fbbeb81254065242e8f67961014a22623b47..c8de3588c3bc9a439f8d3331673c6a31677133f0 100644
--- a/content/renderer/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -2,18 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/renderer/indexed_db/indexed_db_dispatcher.h"
+#include "content/common/indexed_db/indexed_db_dispatcher.h"
#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
+#include "content/common/child_thread.h"
#include "content/common/indexed_db/indexed_db_messages.h"
-#include "content/renderer/indexed_db/renderer_webidbcursor_impl.h"
-#include "content/renderer/indexed_db/renderer_webidbdatabase_impl.h"
-#include "content/renderer/indexed_db/renderer_webidbindex_impl.h"
-#include "content/renderer/indexed_db/renderer_webidbobjectstore_impl.h"
-#include "content/renderer/indexed_db/renderer_webidbtransaction_impl.h"
-#include "content/renderer/render_thread_impl.h"
-#include "content/renderer/render_view_impl.h"
+#include "content/common/indexed_db/proxy_webidbcursor_impl.h"
+#include "content/common/indexed_db/proxy_webidbdatabase_impl.h"
+#include "content/common/indexed_db/proxy_webidbindex_impl.h"
+#include "content/common/indexed_db/proxy_webidbobjectstore_impl.h"
+#include "content/common/indexed_db/proxy_webidbtransaction_impl.h"
#include "ipc/ipc_channel.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbacks.h"
@@ -179,11 +178,9 @@ void IndexedDBDispatcher::RequestIDBFactoryOpen(
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
- if (!web_frame)
- return; // We must be shutting down.
- RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
- if (!render_view)
- return; // We must be shutting down.
+ if (!CurrentWorkerId() &&
+ !ChildThread::current()->IsWebFrameValid(web_frame))
+ return;
IndexedDBHostMsg_FactoryOpen_Params params;
params.thread_id = CurrentWorkerId();
@@ -200,11 +197,9 @@ void IndexedDBDispatcher::RequestIDBFactoryGetDatabaseNames(
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
- if (!web_frame)
- return; // We must be shutting down.
- RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
- if (!render_view)
- return; // We must be shutting down.
+ if (!CurrentWorkerId() &&
+ !ChildThread::current()->IsWebFrameValid(web_frame))
+ return;
IndexedDBHostMsg_FactoryGetDatabaseNames_Params params;
params.thread_id = CurrentWorkerId();
@@ -221,11 +216,9 @@ void IndexedDBDispatcher::RequestIDBFactoryDeleteDatabase(
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
- if (!web_frame)
- return; // We must be shutting down.
- RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
- if (!render_view)
- return; // We must be shutting down.
+ if (!CurrentWorkerId() &&
+ !ChildThread::current()->IsWebFrameValid(web_frame))
+ return;
IndexedDBHostMsg_FactoryDeleteDatabase_Params params;
params.thread_id = CurrentWorkerId();
« no previous file with comments | « content/common/indexed_db/indexed_db_dispatcher.h ('k') | content/common/indexed_db/indexed_db_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698