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

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

Issue 16870007: Switch database/file_identifier to std::string, remove createFromDatabaseIdentifier calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 private: 188 private:
189 int64 database_id_; 189 int64 database_id_;
190 }; 190 };
191 191
192 class DatabaseNameKey { 192 class DatabaseNameKey {
193 public: 193 public:
194 static const char* Decode(const char* start, 194 static const char* Decode(const char* start,
195 const char* limit, 195 const char* limit,
196 DatabaseNameKey* result); 196 DatabaseNameKey* result);
197 CONTENT_EXPORT static std::vector<char> Encode(const string16& origin, 197 CONTENT_EXPORT static std::vector<char> Encode(
198 const string16& database_name); 198 const std::string& origin_identifier,
199 static std::vector<char> EncodeMinKeyForOrigin(const string16& origin); 199 const string16& database_name);
200 static std::vector<char> EncodeStopKeyForOrigin(const string16& origin); 200 static std::vector<char> EncodeMinKeyForOrigin(
201 const std::string& origin_identifier);
202 static std::vector<char> EncodeStopKeyForOrigin(
203 const std::string& origin_identifier);
201 string16 origin() const { return origin_; } 204 string16 origin() const { return origin_; }
202 string16 database_name() const { return database_name_; } 205 string16 database_name() const { return database_name_; }
203 int Compare(const DatabaseNameKey& other); 206 int Compare(const DatabaseNameKey& other);
204 207
205 private: 208 private:
206 string16 origin_; // TODO(jsbell): Store encoded strings, or just pointers. 209 string16 origin_; // TODO(jsbell): Store encoded strings, or just pointers.
207 string16 database_name_; 210 string16 database_name_;
208 }; 211 };
209 212
210 class DatabaseMetaDataKey { 213 class DatabaseMetaDataKey {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 std::vector<char> encoded_user_key_; 449 std::vector<char> encoded_user_key_;
447 std::vector<char> encoded_primary_key_; 450 std::vector<char> encoded_primary_key_;
448 int64 sequence_number_; 451 int64 sequence_number_;
449 452
450 DISALLOW_COPY_AND_ASSIGN(IndexDataKey); 453 DISALLOW_COPY_AND_ASSIGN(IndexDataKey);
451 }; 454 };
452 455
453 } // namespace content 456 } // namespace content
454 457
455 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_ 458 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698