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

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

Issue 192003: Refactor DOM Storage to pave the way for events and locking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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: chrome/browser/in_process_webkit/webkit_context.h
===================================================================
--- chrome/browser/in_process_webkit/webkit_context.h (revision 25608)
+++ chrome/browser/in_process_webkit/webkit_context.h (working copy)
@@ -7,7 +7,10 @@
#include "base/file_path.h"
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
+class DOMStorageContext;
+
// There's one WebKitContext per profile. Various DispatcherHost classes
// have a pointer to the Context to store shared state.
class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> {
@@ -17,13 +20,20 @@
const FilePath& data_path() const { return data_path_; }
bool is_incognito() const { return is_incognito_; }
+ // Initialized lazily. Pointer is valid for the lifetime of this instance.
+ DOMStorageContext* GetDOMStorageContext();
+
private:
friend class base::RefCountedThreadSafe<WebKitContext>;
~WebKitContext();
- FilePath data_path_;
- bool is_incognito_;
+ // Copies of profile data that can be accessed on any thread.
+ const FilePath data_path_;
+ const bool is_incognito_;
+ // The state for DOM Storage.
+ scoped_ptr<DOMStorageContext> dom_storage_context_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(WebKitContext);
};
« no previous file with comments | « chrome/browser/in_process_webkit/storage_namespace.cc ('k') | chrome/browser/in_process_webkit/webkit_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698