Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: content/browser/dom_storage/dom_storage_context_wrapper.h

Issue 2861473002: Clear up session only storage on localstorage shutdown (Closed)
Patch Set: address comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Called on UI thread when the system is under memory pressure. 89 // Called on UI thread when the system is under memory pressure.
90 void OnMemoryPressure( 90 void OnMemoryPressure(
91 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); 91 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
92 92
93 // base::MemoryCoordinatorClient implementation: 93 // base::MemoryCoordinatorClient implementation:
94 void OnPurgeMemory() override; 94 void OnPurgeMemory() override;
95 95
96 void PurgeMemory(DOMStorageContextImpl::PurgeOption purge_option); 96 void PurgeMemory(DOMStorageContextImpl::PurgeOption purge_option);
97 97
98 void GotMojoLocalStorageUsage(GetLocalStorageUsageCallback callback, 98 void GotMojoLocalStorageUsage(GetLocalStorageUsageCallback callback,
99 base::SingleThreadTaskRunner* reply_task_runner,
99 std::vector<LocalStorageUsageInfo> usage); 100 std::vector<LocalStorageUsageInfo> usage);
100 101
101 // Keep all mojo-ish details together and not bleed them through the public 102 // Keep all mojo-ish details together and not bleed them through the public
102 // interface. 103 // interface. The |mojo_state_| object is owned by this object, but destroyed
103 std::unique_ptr<LocalStorageContextMojo> mojo_state_; 104 // asynchronously on the |mojo_task_runner_|.
105 LocalStorageContextMojo* mojo_state_ = nullptr;
106 scoped_refptr<base::SingleThreadTaskRunner> mojo_task_runner_;
104 107
105 // To receive memory pressure signals. 108 // To receive memory pressure signals.
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_
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_browsertest.cc ('k') | content/browser/dom_storage/dom_storage_context_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698