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

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

Issue 2349413002: Minor IndexedDB refactorings. (Closed)
Patch Set: Rebased Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 , id(id) 46 , id(id)
47 , keyPath(keyPath) 47 , keyPath(keyPath)
48 , unique(unique) 48 , unique(unique)
49 , multiEntry(multiEntry) { } 49 , multiEntry(multiEntry) { }
50 String name; 50 String name;
51 int64_t id; 51 int64_t id;
52 IDBKeyPath keyPath; 52 IDBKeyPath keyPath;
53 bool unique; 53 bool unique;
54 bool multiEntry; 54 bool multiEntry;
55 55
56 static const int64_t InvalidId = -1; 56 static constexpr int64_t InvalidId = -1;
57 }; 57 };
58 58
59 struct IDBObjectStoreMetadata { 59 struct IDBObjectStoreMetadata {
60 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 60 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
61 IDBObjectStoreMetadata() { } 61 IDBObjectStoreMetadata() { }
62 IDBObjectStoreMetadata(const String& name, int64_t id, const IDBKeyPath& key Path, bool autoIncrement, int64_t maxIndexId) 62 IDBObjectStoreMetadata(const String& name, int64_t id, const IDBKeyPath& key Path, bool autoIncrement, int64_t maxIndexId)
63 : name(name) 63 : name(name)
64 , id(id) 64 , id(id)
65 , keyPath(keyPath) 65 , keyPath(keyPath)
66 , autoIncrement(autoIncrement) 66 , autoIncrement(autoIncrement)
67 , maxIndexId(maxIndexId) 67 , maxIndexId(maxIndexId)
68 { 68 {
69 } 69 }
70 String name; 70 String name;
71 int64_t id; 71 int64_t id;
72 IDBKeyPath keyPath; 72 IDBKeyPath keyPath;
73 bool autoIncrement; 73 bool autoIncrement;
74 int64_t maxIndexId; 74 int64_t maxIndexId;
75 75
76 static const int64_t InvalidId = -1; 76 static constexpr int64_t InvalidId = -1;
77 77
78 typedef HashMap<int64_t, IDBIndexMetadata> IndexMap; 78 typedef HashMap<int64_t, IDBIndexMetadata> IndexMap;
79 IndexMap indexes; 79 IndexMap indexes;
80 }; 80 };
81 81
82 struct IDBDatabaseMetadata { 82 struct IDBDatabaseMetadata {
83 DISALLOW_NEW(); 83 DISALLOW_NEW();
84 // FIXME: These can probably be collapsed into 0. 84 // FIXME: These can probably be collapsed into 0.
85 enum { 85 enum {
86 NoVersion = -1, 86 NoVersion = -1,
(...skipping 21 matching lines...) Expand all
108 int64_t id; 108 int64_t id;
109 int64_t version; 109 int64_t version;
110 int64_t maxObjectStoreId; 110 int64_t maxObjectStoreId;
111 111
112 ObjectStoreMap objectStores; 112 ObjectStoreMap objectStores;
113 }; 113 };
114 114
115 } // namespace blink 115 } // namespace blink
116 116
117 #endif // IDBMetadata_h 117 #endif // IDBMetadata_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBIndex.cpp ('k') | third_party/WebKit/Source/modules/indexeddb/IDBMetadata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698