OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/memory_coordinator_client.h" | 12 #include "base/memory/memory_coordinator_client.h" |
13 #include "base/memory/memory_pressure_listener.h" | 13 #include "base/memory/memory_pressure_listener.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "content/browser/dom_storage/dom_storage_context_impl.h" | 15 #include "content/browser/dom_storage/dom_storage_context_impl.h" |
| 16 #include "content/browser/dom_storage/dom_storage_task_runner.h" |
16 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
17 #include "content/common/storage_partition_service.mojom.h" | 18 #include "content/common/storage_partition_service.mojom.h" |
18 #include "content/public/browser/dom_storage_context.h" | 19 #include "content/public/browser/dom_storage_context.h" |
19 #include "url/origin.h" | 20 #include "url/origin.h" |
20 | 21 |
21 namespace base { | 22 namespace base { |
22 class FilePath; | 23 class FilePath; |
23 } | 24 } |
24 | 25 |
25 namespace service_manager { | 26 namespace service_manager { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Used by content settings to alter the behavior around | 66 // Used by content settings to alter the behavior around |
66 // what data to keep and what data to discard at shutdown. | 67 // what data to keep and what data to discard at shutdown. |
67 // The policy is not so straight forward to describe, see | 68 // The policy is not so straight forward to describe, see |
68 // the implementation for details. | 69 // the implementation for details. |
69 void SetForceKeepSessionState(); | 70 void SetForceKeepSessionState(); |
70 | 71 |
71 // Called when the BrowserContext/Profile is going away. | 72 // Called when the BrowserContext/Profile is going away. |
72 void Shutdown(); | 73 void Shutdown(); |
73 | 74 |
74 void Flush(); | 75 void Flush(); |
| 76 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner( |
| 77 DOMStorageTaskRunner::SequenceID id); |
75 | 78 |
76 // See mojom::StoragePartitionService interface. | 79 // See mojom::StoragePartitionService interface. |
77 void OpenLocalStorage(const url::Origin& origin, | 80 void OpenLocalStorage(const url::Origin& origin, |
78 mojom::LevelDBWrapperRequest request); | 81 mojom::LevelDBWrapperRequest request); |
79 | 82 |
80 private: | 83 private: |
81 friend class DOMStorageMessageFilter; // for access to context() | 84 friend class DOMStorageMessageFilter; // for access to context() |
82 friend class SessionStorageNamespaceImpl; // ditto | 85 friend class SessionStorageNamespaceImpl; // ditto |
83 friend class base::RefCountedThreadSafe<DOMStorageContextWrapper>; | 86 friend class base::RefCountedThreadSafe<DOMStorageContextWrapper>; |
84 friend class MojoDOMStorageBrowserTest; | 87 friend class MojoDOMStorageBrowserTest; |
(...skipping 21 matching lines...) Expand all Loading... |
106 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 109 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
107 | 110 |
108 scoped_refptr<DOMStorageContextImpl> context_; | 111 scoped_refptr<DOMStorageContextImpl> context_; |
109 | 112 |
110 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); | 113 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); |
111 }; | 114 }; |
112 | 115 |
113 } // namespace content | 116 } // namespace content |
114 | 117 |
115 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ | 118 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ |
OLD | NEW |