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

Unified Diff: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h

Issue 149238: Change the lifetime of the WebKit thread to be a subset of the IO thread's li... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « chrome/browser/chrome_thread.cc ('k') | chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h
===================================================================
--- chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h (revision 20100)
+++ chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h (working copy)
@@ -6,7 +6,6 @@
#define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_DISPATCHER_HOST_H_
#include "base/ref_counted.h"
-#include "base/thread.h"
#include "chrome/common/ipc_message.h"
class WebKitContext;
@@ -15,7 +14,7 @@
// This class handles the logistics of DOM Storage within the browser process.
// It mostly ferries information between IPCs and the WebKit implementations,
// but it also handles some special cases like when renderer processes die.
-// THIS CLASS MUST NOT BE DESTROYED ON THE WEBKIT THREAD (for now).
+// THIS CLASS MUST NOT BE DESTROYED ON THE WEBKIT THREAD.
class DOMStorageDispatcherHost :
public base::RefCountedThreadSafe<DOMStorageDispatcherHost> {
public:
@@ -23,10 +22,6 @@
DOMStorageDispatcherHost(IPC::Message::Sender* message_sender,
WebKitContext*, WebKitThread*);
- // Only call Shutdown from the IO thread. Shutdown warns us that we're going
- // to go away soon and tells us not to send anything else to the IO thread.
- void Shutdown();
-
// Only call from IO thread.
bool OnMessageReceived(const IPC::Message& message);
@@ -38,18 +33,13 @@
friend class base::RefCountedThreadSafe<DOMStorageDispatcherHost>;
~DOMStorageDispatcherHost();
- // Obviously can be called from any thread.
- bool IsOnIOThread() const;
- bool IsOnWebKitThread() const;
-
- // Are immutable and are always valid throughout the lifetime of the object.
+ // Data shared between renderer processes with the same profile.
scoped_refptr<WebKitContext> webkit_context_;
- scoped_refptr<WebKitThread> webkit_thread_;
- // We keep the message_sender_ pointer for sending messages. All access
- // to the message_sender_ (and the IO thread in general) should be done under
- // this lock and only if message_sender_ is non-NULL.
- Lock message_sender_lock_;
+ // ResourceDispatcherHost takes care of destruction. Immutable.
+ WebKitThread* webkit_thread_;
+
+ // Only set on the IO thread.
IPC::Message::Sender* message_sender_;
DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageDispatcherHost);
« no previous file with comments | « chrome/browser/chrome_thread.cc ('k') | chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698