| 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_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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |