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..31a90fec2bf4e29c346d46166fc3fad15266ad45 100644 |
--- a/chrome/browser/in_process_webkit/webkit_context.h |
+++ b/chrome/browser/in_process_webkit/webkit_context.h |
@@ -24,9 +24,10 @@ 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: |
- explicit WebKitContext(Profile* profile); |
+ explicit WebKitContext(Profile* profile, bool clear_local_state_on_exit); |
const FilePath& data_path() const { return data_path_; } |
bool is_incognito() const { return is_incognito_; } |
@@ -39,6 +40,10 @@ class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> { |
return indexed_db_context_.get(); |
} |
+ void set_clear_local_state_on_exit(bool clear_local_state) { |
+ clear_local_state_on_exit_ = clear_local_state; |
+ } |
+ |
#ifdef UNIT_TEST |
// For unit tests, allow specifying a DOMStorageContext directly so it can be |
// mocked. |
@@ -62,12 +67,15 @@ class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> { |
private: |
friend class base::RefCountedThreadSafe<WebKitContext>; |
- ~WebKitContext(); |
+ virtual ~WebKitContext(); |
// Copies of profile data that can be accessed on any thread. |
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_; |
+ |
scoped_ptr<DOMStorageContext> dom_storage_context_; |
scoped_ptr<IndexedDBContext> indexed_db_context_; |