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

Side by Side Diff: content/browser/indexed_db/indexed_db_leveldb_coding.cc

Issue 19752007: Use builders to convert between WebKit and content IDB types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | content/child/indexed_db/indexed_db_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_leveldb_coding.h" 5 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 using base::StringPiece; 151 using base::StringPiece;
152 using WebKit::WebIDBKeyType; 152 using WebKit::WebIDBKeyType;
153 using WebKit::WebIDBKeyTypeArray; 153 using WebKit::WebIDBKeyTypeArray;
154 using WebKit::WebIDBKeyTypeDate; 154 using WebKit::WebIDBKeyTypeDate;
155 using WebKit::WebIDBKeyTypeInvalid; 155 using WebKit::WebIDBKeyTypeInvalid;
156 using WebKit::WebIDBKeyTypeMin; 156 using WebKit::WebIDBKeyTypeMin;
157 using WebKit::WebIDBKeyTypeNull; 157 using WebKit::WebIDBKeyTypeNull;
158 using WebKit::WebIDBKeyTypeNumber; 158 using WebKit::WebIDBKeyTypeNumber;
159 using WebKit::WebIDBKeyTypeString; 159 using WebKit::WebIDBKeyTypeString;
160 using WebKit::WebIDBKeyPath;
161 using WebKit::WebIDBKeyPathType; 160 using WebKit::WebIDBKeyPathType;
162 using WebKit::WebIDBKeyPathTypeArray; 161 using WebKit::WebIDBKeyPathTypeArray;
163 using WebKit::WebIDBKeyPathTypeNull; 162 using WebKit::WebIDBKeyPathTypeNull;
164 using WebKit::WebIDBKeyPathTypeString; 163 using WebKit::WebIDBKeyPathTypeString;
165 164
166 namespace content { 165 namespace content {
167 166
168 // As most of the IndexedDBKeys and encoded values are short, we 167 // As most of the IndexedDBKeys and encoded values are short, we
169 // initialize some Vectors with a default inline buffer size to reduce 168 // initialize some Vectors with a default inline buffer size to reduce
170 // the memory re-allocations when the Vectors are appended. 169 // the memory re-allocations when the Vectors are appended.
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 scoped_ptr<IndexedDBKey> IndexDataKey::primary_key() const { 1827 scoped_ptr<IndexedDBKey> IndexDataKey::primary_key() const {
1829 scoped_ptr<IndexedDBKey> key; 1828 scoped_ptr<IndexedDBKey> key;
1830 StringPiece slice(encoded_primary_key_); 1829 StringPiece slice(encoded_primary_key_);
1831 if (!DecodeIDBKey(&slice, &key)) { 1830 if (!DecodeIDBKey(&slice, &key)) {
1832 // TODO(jsbell): Return error. 1831 // TODO(jsbell): Return error.
1833 } 1832 }
1834 return key.Pass(); 1833 return key.Pass();
1835 } 1834 }
1836 1835
1837 } // namespace content 1836 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/indexed_db/indexed_db_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698