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

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

Issue 2309523002: DOM Storage: Populate commit batch values lazily to avoid memory bloat (Closed)
Patch Set: Actually save the memory Created 4 years, 3 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
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_AREA_H_ 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // If we haven't done so already and this is a local storage area, 159 // If we haven't done so already and this is a local storage area,
160 // will attempt to read any values for this origin currently 160 // will attempt to read any values for this origin currently
161 // stored on disk. 161 // stored on disk.
162 void InitialImportIfNeeded(); 162 void InitialImportIfNeeded();
163 163
164 // Post tasks to defer writing a batch of changed values to 164 // Post tasks to defer writing a batch of changed values to
165 // disk on the commit sequence, and to call back on the primary 165 // disk on the commit sequence, and to call back on the primary
166 // task sequence when complete. 166 // task sequence when complete.
167 CommitBatch* CreateCommitBatchIfNeeded(); 167 CommitBatch* CreateCommitBatchIfNeeded();
168 void PopulateCommitBatchValues();
168 void StartCommitTimer(); 169 void StartCommitTimer();
169 void OnCommitTimer(); 170 void OnCommitTimer();
170 void PostCommitTask(); 171 void PostCommitTask();
171 void CommitChanges(const CommitBatch* commit_batch); 172 void CommitChanges(const CommitBatch* commit_batch);
172 void OnCommitComplete(); 173 void OnCommitComplete();
173 base::TimeDelta ComputeCommitDelay() const; 174 base::TimeDelta ComputeCommitDelay() const;
174 175
175 void ShutdownInCommitSequence(); 176 void ShutdownInCommitSequence();
176 177
177 static bool s_aggressive_flushing_enabled_; 178 static bool s_aggressive_flushing_enabled_;
(...skipping 13 matching lines...) Expand all
191 base::TimeTicks start_time_; 192 base::TimeTicks start_time_;
192 RateLimiter data_rate_limiter_; 193 RateLimiter data_rate_limiter_;
193 RateLimiter commit_rate_limiter_; 194 RateLimiter commit_rate_limiter_;
194 195
195 DISALLOW_COPY_AND_ASSIGN(DOMStorageArea); 196 DISALLOW_COPY_AND_ASSIGN(DOMStorageArea);
196 }; 197 };
197 198
198 } // namespace content 199 } // namespace content
199 200
200 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_ 201 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698