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

Side by Side Diff: content/browser/indexed_db/indexed_db_index_writer.h

Issue 15659013: Revert "Migrate the IndexedDB backend from Blink to Chromium" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INDEX_WRITER_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INDEX_WRITER_H_
7
8 #include <map>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/memory/scoped_vector.h"
13 #include "content/browser/indexed_db/indexed_db_backing_store.h"
14 #include "content/browser/indexed_db/indexed_db_database_impl.h"
15 #include "content/browser/indexed_db/indexed_db_metadata.h"
16 #include "content/common/indexed_db/indexed_db_key_path.h"
17
18 namespace content {
19
20 class IndexedDBDatabaseImpl;
21 class IndexedDBTransaction;
22 struct IndexedDBObjectStoreMetadata;
23
24 // TODO(alecflett): this namespace is temporary until we move its contents out
25 // to their own home.
26 namespace IndexedDBObjectStoreImpl {
27
28 class IndexWriter {
29 public:
30 explicit IndexWriter(const IndexedDBIndexMetadata& index_metadata);
31
32 IndexWriter(const IndexedDBIndexMetadata& index_metadata,
33 const IndexedDBDatabase::IndexKeys& index_keys);
34
35 bool VerifyIndexKeys(IndexedDBBackingStore* store,
36 IndexedDBBackingStore::Transaction* transaction,
37 int64 database_id,
38 int64 object_store_id,
39 int64 index_id,
40 bool* can_add_keys,
41 const IndexedDBKey& primary_key,
42 string16* error_message = 0) const WARN_UNUSED_RESULT;
43
44 void WriteIndexKeys(const IndexedDBBackingStore::RecordIdentifier& record,
45 IndexedDBBackingStore* store,
46 IndexedDBBackingStore::Transaction* transaction,
47 int64 database_id,
48 int64 object_store_id) const;
49
50 ~IndexWriter();
51
52 private:
53 bool AddingKeyAllowed(IndexedDBBackingStore* store,
54 IndexedDBBackingStore::Transaction* transaction,
55 int64 database_id,
56 int64 object_store_id,
57 int64 index_id,
58 const IndexedDBKey& index_key,
59 const IndexedDBKey& primary_key,
60 bool* allowed) const WARN_UNUSED_RESULT;
61
62 const IndexedDBIndexMetadata index_metadata_;
63 IndexedDBDatabase::IndexKeys index_keys_;
64 };
65
66 bool MakeIndexWriters(
67 scoped_refptr<IndexedDBTransaction> transaction,
68 IndexedDBBackingStore* store,
69 int64 database_id,
70 const IndexedDBObjectStoreMetadata& metadata,
71 const IndexedDBKey& primary_key,
72 bool key_was_generated,
73 const std::vector<int64>& index_ids,
74 const std::vector<IndexedDBDatabase::IndexKeys>& index_keys,
75 ScopedVector<IndexWriter>* index_writers,
76 string16* error_message,
77 bool* completed) WARN_UNUSED_RESULT;
78 };
79
80 } // namespace content
81
82 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INDEX_WRITER_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_factory_impl.cc ('k') | content/browser/indexed_db/indexed_db_index_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698