| Index: chrome/browser/in_process_webkit/webkit_context.h
|
| diff --git a/chrome/browser/in_process_webkit/webkit_context.h b/chrome/browser/in_process_webkit/webkit_context.h
|
| index be20825c02557b460d37fc89eee5823d741c4fd9..3251ab97323c9cbac0b69634b6c4d6aa61494b61 100644
|
| --- a/chrome/browser/in_process_webkit/webkit_context.h
|
| +++ b/chrome/browser/in_process_webkit/webkit_context.h
|
| @@ -14,6 +14,8 @@
|
| #include "base/time.h"
|
| #include "chrome/browser/in_process_webkit/dom_storage_context.h"
|
| #include "chrome/browser/in_process_webkit/indexed_db_context.h"
|
| +#include "chrome/browser/prefs/pref_change_registrar.h"
|
| +#include "chrome/common/notification_observer.h"
|
|
|
| class Profile;
|
|
|
| @@ -24,7 +26,9 @@ class Profile;
|
| //
|
| // This class is created on the UI thread and accessed on the UI, IO, and WebKit
|
| // threads.
|
| -class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> {
|
| +class WebKitContext
|
| + : public base::RefCountedThreadSafe<WebKitContext>,
|
| + public NotificationObserver {
|
| public:
|
| explicit WebKitContext(Profile* profile);
|
|
|
| @@ -60,6 +64,11 @@ class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> {
|
| // called from any thread.
|
| void DeleteSessionStorageNamespace(int64 session_storage_namespace_id);
|
|
|
| + // NotificationObserver implementation.
|
| + virtual void Observe(NotificationType type,
|
| + const NotificationSource& source,
|
| + const NotificationDetails& details);
|
| +
|
| private:
|
| friend class base::RefCountedThreadSafe<WebKitContext>;
|
| ~WebKitContext();
|
| @@ -68,6 +77,14 @@ class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> {
|
| const FilePath data_path_;
|
| const bool is_incognito_;
|
|
|
| + // True if the destructors of context objects should delete their files.
|
| + bool clear_local_state_on_exit_;
|
| +
|
| + // The observer needs to extract the new value of the pref when notified.
|
| + Profile* profile_;
|
| +
|
| + PrefChangeRegistrar pref_change_registrar_;
|
| +
|
| scoped_ptr<DOMStorageContext> dom_storage_context_;
|
|
|
| scoped_ptr<IndexedDBContext> indexed_db_context_;
|
|
|