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 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "content/public/browser/dom_storage_context.h" | 9 #include "content/public/browser/dom_storage_context.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 DOMStorageContextImpl(const FilePath& data_path, | 24 DOMStorageContextImpl(const FilePath& data_path, |
25 quota::SpecialStoragePolicy* special_storage_policy); | 25 quota::SpecialStoragePolicy* special_storage_policy); |
26 | 26 |
27 // DOMStorageContext implementation. | 27 // DOMStorageContext implementation. |
28 virtual void GetUsageInfo(const GetUsageInfoCallback& callback) OVERRIDE; | 28 virtual void GetUsageInfo(const GetUsageInfoCallback& callback) OVERRIDE; |
29 virtual void DeleteOrigin(const GURL& origin) OVERRIDE; | 29 virtual void DeleteOrigin(const GURL& origin) OVERRIDE; |
30 virtual void SetSaveSessionStorageOnDisk() OVERRIDE; | 30 virtual void SetSaveSessionStorageOnDisk() OVERRIDE; |
31 virtual scoped_refptr<content::SessionStorageNamespace> | 31 virtual scoped_refptr<content::SessionStorageNamespace> |
32 RecreateSessionStorage(const std::string& persistent_id) OVERRIDE; | 32 RecreateSessionStorage(const std::string& persistent_id) OVERRIDE; |
33 virtual void StartScavengingUnusedSessionStorage() OVERRIDE; | 33 virtual void StartScavengingUnusedSessionStorage() OVERRIDE; |
| 34 virtual void DisableCommitDelayForTesting() OVERRIDE; |
34 | 35 |
35 // Called to free up memory that's not strictly needed. | 36 // Called to free up memory that's not strictly needed. |
36 void PurgeMemory(); | 37 void PurgeMemory(); |
37 | 38 |
38 // Used by content settings to alter the behavior around | 39 // Used by content settings to alter the behavior around |
39 // what data to keep and what data to discard at shutdown. | 40 // what data to keep and what data to discard at shutdown. |
40 // The policy is not so straight forward to describe, see | 41 // The policy is not so straight forward to describe, see |
41 // the implementation for details. | 42 // the implementation for details. |
42 void SetForceKeepSessionState(); | 43 void SetForceKeepSessionState(); |
43 | 44 |
44 // Called when the BrowserContext/Profile is going away. | 45 // Called when the BrowserContext/Profile is going away. |
45 void Shutdown(); | 46 void Shutdown(); |
46 | 47 |
47 private: | 48 private: |
48 friend class DOMStorageMessageFilter; // for access to context() | 49 friend class DOMStorageMessageFilter; // for access to context() |
49 friend class SessionStorageNamespaceImpl; // ditto | 50 friend class SessionStorageNamespaceImpl; // ditto |
50 friend class base::RefCountedThreadSafe<DOMStorageContextImpl>; | 51 friend class base::RefCountedThreadSafe<DOMStorageContextImpl>; |
51 | 52 |
52 virtual ~DOMStorageContextImpl(); | 53 virtual ~DOMStorageContextImpl(); |
53 dom_storage::DomStorageContext* context() const { return context_.get(); } | 54 dom_storage::DomStorageContext* context() const { return context_.get(); } |
54 | 55 |
55 scoped_refptr<dom_storage::DomStorageContext> context_; | 56 scoped_refptr<dom_storage::DomStorageContext> context_; |
56 | 57 |
57 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl); | 58 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextImpl); |
58 }; | 59 }; |
59 | 60 |
60 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ | 61 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_ |
OLD | NEW |