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

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: rebase 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.
103 std::unique_ptr<LocalStorageContextMojo> mojo_state_; 104 LocalStorageContextMojo* mojo_state_ = nullptr;
michaeln 2017/05/18 23:55:39 maybe continue using std::unique_ptr<> to document
Marijn Kruisselbrink 2017/05/19 00:19:46 It definitely would be cleanest to somehow have a
105 scoped_refptr<base::SingleThreadTaskRunner> mojo_task_runner_;
104 106
105 // To receive memory pressure signals. 107 // To receive memory pressure signals.
106 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; 108 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
107 109
108 scoped_refptr<DOMStorageContextImpl> context_; 110 scoped_refptr<DOMStorageContextImpl> context_;
109 111
110 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper); 112 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper);
111 }; 113 };
112 114
113 } // namespace content 115 } // namespace content
114 116
115 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_ 117 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698