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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs Created 3 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/indexeddb/IDBMetadata.h" 5 #include "modules/indexeddb/IDBMetadata.h"
6 6
7 #include "public/platform/modules/indexeddb/WebIDBMetadata.h" 7 #include "public/platform/modules/indexeddb/WebIDBMetadata.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 RefPtr<IDBObjectStoreMetadata> IDBObjectStoreMetadata::createCopy() const { 41 RefPtr<IDBObjectStoreMetadata> IDBObjectStoreMetadata::createCopy() const {
42 RefPtr<IDBObjectStoreMetadata> copy = adoptRef( 42 RefPtr<IDBObjectStoreMetadata> copy = adoptRef(
43 new IDBObjectStoreMetadata(name, id, keyPath, autoIncrement, maxIndexId)); 43 new IDBObjectStoreMetadata(name, id, keyPath, autoIncrement, maxIndexId));
44 44
45 for (const auto& it : indexes) { 45 for (const auto& it : indexes) {
46 IDBIndexMetadata* index = it.value.get(); 46 IDBIndexMetadata* index = it.value.get();
47 RefPtr<IDBIndexMetadata> indexCopy = 47 RefPtr<IDBIndexMetadata> indexCopy =
48 adoptRef(new IDBIndexMetadata(index->name, index->id, index->keyPath, 48 adoptRef(new IDBIndexMetadata(index->name, index->id, index->keyPath,
49 index->unique, index->multiEntry)); 49 index->unique, index->multiEntry));
50 copy->indexes.add(it.key, std::move(indexCopy)); 50 copy->indexes.insert(it.key, std::move(indexCopy));
51 } 51 }
52 return copy; 52 return copy;
53 } 53 }
54 54
55 IDBDatabaseMetadata::IDBDatabaseMetadata() 55 IDBDatabaseMetadata::IDBDatabaseMetadata()
56 : version(IDBDatabaseMetadata::NoVersion) {} 56 : version(IDBDatabaseMetadata::NoVersion) {}
57 57
58 IDBDatabaseMetadata::IDBDatabaseMetadata(const String& name, 58 IDBDatabaseMetadata::IDBDatabaseMetadata(const String& name,
59 int64_t id, 59 int64_t id,
60 int64_t version, 60 int64_t version,
(...skipping 29 matching lines...) Expand all
90 } 90 }
91 91
92 void IDBDatabaseMetadata::copyFrom(const IDBDatabaseMetadata& metadata) { 92 void IDBDatabaseMetadata::copyFrom(const IDBDatabaseMetadata& metadata) {
93 name = metadata.name; 93 name = metadata.name;
94 id = metadata.id; 94 id = metadata.id;
95 version = metadata.version; 95 version = metadata.version;
96 maxObjectStoreId = metadata.maxObjectStoreId; 96 maxObjectStoreId = metadata.maxObjectStoreId;
97 } 97 }
98 98
99 } // namespace blink 99 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698