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

Side by Side Diff: webkit/dom_storage/dom_storage_area.h

Issue 10389061: DomStorageArea: Allow multiple simultaneous in flight commit batches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // If we haven't done so already and this is a local storage area, 91 // If we haven't done so already and this is a local storage area,
92 // will attempt to read any values for this origin currently 92 // will attempt to read any values for this origin currently
93 // stored on disk. 93 // stored on disk.
94 void InitialImportIfNeeded(); 94 void InitialImportIfNeeded();
95 95
96 // Post tasks to defer writing a batch of changed values to 96 // Post tasks to defer writing a batch of changed values to
97 // disk on the commit sequence, and to call back on the primary 97 // disk on the commit sequence, and to call back on the primary
98 // task sequence when complete. 98 // task sequence when complete.
99 CommitBatch* CreateCommitBatchIfNeeded(); 99 CommitBatch* CreateCommitBatchIfNeeded();
100 void OnCommitTimer(); 100 void OnCommitTimer();
101 void CommitChanges(); 101 void CommitChanges(const CommitBatch* commit_batch);
102 void OnCommitComplete(); 102 void OnCommitComplete();
103 103
104 void ShutdownInCommitSequence(); 104 void ShutdownInCommitSequence();
105 105
106 int64 namespace_id_; 106 int64 namespace_id_;
107 GURL origin_; 107 GURL origin_;
108 FilePath directory_; 108 FilePath directory_;
109 scoped_refptr<DomStorageTaskRunner> task_runner_; 109 scoped_refptr<DomStorageTaskRunner> task_runner_;
110 scoped_refptr<DomStorageMap> map_; 110 scoped_refptr<DomStorageMap> map_;
111 scoped_ptr<DomStorageDatabase> backing_; 111 scoped_ptr<DomStorageDatabase> backing_;
112 bool is_initial_import_done_; 112 bool is_initial_import_done_;
113 bool is_shutdown_; 113 bool is_shutdown_;
114 scoped_ptr<CommitBatch> commit_batch_; 114 scoped_ptr<CommitBatch> commit_batch_;
115 scoped_ptr<CommitBatch> in_flight_commit_batch_; 115 int commit_batches_in_flight_;
116 }; 116 };
117 117
118 } // namespace dom_storage 118 } // namespace dom_storage
119 119
120 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_ 120 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_AREA_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698