| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 &found); | 112 &found); |
| 113 if (!s.ok()) | 113 if (!s.ok()) |
| 114 return false; | 114 return false; |
| 115 if (!found || | 115 if (!found || |
| 116 (primary_key.IsValid() && found_primary_key->Equals(primary_key))) | 116 (primary_key.IsValid() && found_primary_key->Equals(primary_key))) |
| 117 *allowed = true; | 117 *allowed = true; |
| 118 return true; | 118 return true; |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool MakeIndexWriters( | 121 bool MakeIndexWriters( |
| 122 scoped_refptr<IndexedDBTransaction> transaction, | 122 IndexedDBTransaction* transaction, |
| 123 IndexedDBBackingStore* backing_store, | 123 IndexedDBBackingStore* backing_store, |
| 124 int64 database_id, | 124 int64 database_id, |
| 125 const IndexedDBObjectStoreMetadata& object_store, | 125 const IndexedDBObjectStoreMetadata& object_store, |
| 126 const IndexedDBKey& primary_key, // makes a copy | 126 const IndexedDBKey& primary_key, // makes a copy |
| 127 bool key_was_generated, | 127 bool key_was_generated, |
| 128 const std::vector<IndexedDBDatabase::IndexKeys>& index_keys, | 128 const std::vector<IndexedDBDatabase::IndexKeys>& index_keys, |
| 129 ScopedVector<IndexWriter>* index_writers, | 129 ScopedVector<IndexWriter>* index_writers, |
| 130 base::string16* error_message, | 130 base::string16* error_message, |
| 131 bool* completed) { | 131 bool* completed) { |
| 132 *completed = false; | 132 *completed = false; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 return true; | 164 return true; |
| 165 | 165 |
| 166 index_writers->push_back(index_writer.release()); | 166 index_writers->push_back(index_writer.release()); |
| 167 } | 167 } |
| 168 | 168 |
| 169 *completed = true; | 169 *completed = true; |
| 170 return true; | 170 return true; |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace content | 173 } // namespace content |
| OLD | NEW |