Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/browser/indexed_db/indexed_db_index_writer.h" | 5 #include "content/browser/indexed_db/indexed_db_index_writer.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 9 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 10 #include "content/browser/indexed_db/indexed_db_tracing.h" | 10 #include "content/browser/indexed_db/indexed_db_tracing.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 &found_primary_key, | 105 &found_primary_key, |
| 106 &found); | 106 &found); |
| 107 if (!ok) | 107 if (!ok) |
| 108 return false; | 108 return false; |
| 109 if (!found || | 109 if (!found || |
| 110 (primary_key.IsValid() && found_primary_key->IsEqual(primary_key))) | 110 (primary_key.IsValid() && found_primary_key->IsEqual(primary_key))) |
| 111 *allowed = true; | 111 *allowed = true; |
| 112 return true; | 112 return true; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool MakeIndexWriters( | 115 bool MakeIndexWriters( // TODO(ericu): This should be a raw pointer? |
|
jsbell
2013/12/20 00:44:20
Which, specifically?
ericu
2014/02/20 00:50:29
The transaction. I see nothing here that requires
jsbell
2014/02/20 22:55:50
Agreed.
| |
| 116 scoped_refptr<IndexedDBTransaction> transaction, | 116 scoped_refptr<IndexedDBTransaction> transaction, |
| 117 IndexedDBBackingStore* backing_store, | 117 IndexedDBBackingStore* backing_store, |
| 118 int64 database_id, | 118 int64 database_id, |
| 119 const IndexedDBObjectStoreMetadata& object_store, | 119 const IndexedDBObjectStoreMetadata& object_store, |
| 120 const IndexedDBKey& primary_key, // makes a copy | 120 const IndexedDBKey& primary_key, // makes a copy |
| 121 bool key_was_generated, | 121 bool key_was_generated, |
| 122 const std::vector<int64>& index_ids, | 122 const std::vector<int64>& index_ids, |
| 123 const std::vector<IndexedDBDatabase::IndexKeys>& index_keys, | 123 const std::vector<IndexedDBDatabase::IndexKeys>& index_keys, |
| 124 ScopedVector<IndexWriter>* index_writers, | 124 ScopedVector<IndexWriter>* index_writers, |
| 125 string16* error_message, | 125 string16* error_message, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 return true; | 160 return true; |
| 161 | 161 |
| 162 index_writers->push_back(index_writer.release()); | 162 index_writers->push_back(index_writer.release()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 *completed = true; | 165 *completed = true; |
| 166 return true; | 166 return true; |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace content | 169 } // namespace content |
| OLD | NEW |