| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 virtual void DeleteLocalStorageFile(const FilePath& file_path) OVERRIDE; | 39 virtual void DeleteLocalStorageFile(const FilePath& file_path) OVERRIDE; |
| 40 virtual void DeleteDataModifiedSince(const base::Time& cutoff) OVERRIDE; | 40 virtual void DeleteDataModifiedSince(const base::Time& cutoff) OVERRIDE; |
| 41 | 41 |
| 42 // Called to free up memory that's not strictly needed. | 42 // Called to free up memory that's not strictly needed. |
| 43 void PurgeMemory(); | 43 void PurgeMemory(); |
| 44 | 44 |
| 45 // Used by content settings to alter the behavior around | 45 // Used by content settings to alter the behavior around |
| 46 // what data to keep and what data to discard at shutdown. | 46 // what data to keep and what data to discard at shutdown. |
| 47 // The policy is not so straight forward to describe, see | 47 // The policy is not so straight forward to describe, see |
| 48 // the implementation for details. | 48 // the implementation for details. |
| 49 void SetClearLocalState(bool clear_local_state); | 49 void SetForceKeepSessionState(); |
| 50 void SaveSessionState(); | |
| 51 | 50 |
| 52 // Called when the BrowserContext/Profile is going away. | 51 // Called when the BrowserContext/Profile is going away. |
| 53 void Shutdown(); | 52 void Shutdown(); |
| 54 | 53 |
| 55 // See render_message_filter.cc for details. | 54 // See render_message_filter.cc for details. |
| 56 // TODO(michaeln): Remove this method when that bug is fixed. | 55 // TODO(michaeln): Remove this method when that bug is fixed. |
| 57 int64 LeakyCloneSessionStorage(int64 existing_namespace_id); | 56 int64 LeakyCloneSessionStorage(int64 existing_namespace_id); |
| 58 | 57 |
| 59 private: | 58 private: |
| 60 friend class DOMStorageMessageFilter; // for access to context() | 59 friend class DOMStorageMessageFilter; // for access to context() |
| 61 friend class SessionStorageNamespaceImpl; // ditto | 60 friend class SessionStorageNamespaceImpl; // ditto |
| 62 friend class base::RefCountedThreadSafe<DOMStorageContextImpl>; | 61 friend class base::RefCountedThreadSafe<DOMStorageContextImpl>; |
| 63 | 62 |
| 64 virtual ~DOMStorageContextImpl(); | 63 virtual ~DOMStorageContextImpl(); |
| 65 dom_storage::DomStorageContext* context() const { return context_.get(); } | 64 dom_storage::DomStorageContext* context() const { return context_.get(); } |
| 66 | 65 |
| 67 scoped_refptr<dom_storage::DomStorageContext> context_; | 66 scoped_refptr<dom_storage::DomStorageContext> context_; |
| 68 | 67 |
| 69 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl); | 68 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl); |
| 70 }; | 69 }; |
| 71 | 70 |
| 72 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 71 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
| OLD | NEW |