Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_leveldb_coding.cc |
| diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc |
| index 51d29acf60ba38f39b8161c73cc5a1fd472bef26..04c120768ce16432d5853c64ae454bded9fad84e 100644 |
| --- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc |
| +++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc |
| @@ -10,6 +10,8 @@ |
| #include "base/logging.h" |
| #include "base/strings/string16.h" |
| +#include "base/strings/string_piece.h" |
|
jsbell
2013/06/20 16:38:40
Explicitly included by the .h for this .cc... is t
jamesr
2013/06/20 16:54:32
I was having trouble seeing the std::string -> bas
|
| +#include "base/strings/utf_string_conversions.h" |
| #include "base/sys_byteorder.h" |
| #include "content/browser/indexed_db/leveldb/leveldb_slice.h" |
| #include "content/common/indexed_db/indexed_db_key.h" |
| @@ -1277,24 +1279,24 @@ const char* DatabaseNameKey::Decode(const char* start, |
| return slice.begin(); |
| } |
| -std::vector<char> DatabaseNameKey::Encode(const string16& origin, |
| +std::vector<char> DatabaseNameKey::Encode(const std::string& origin_identifier, |
| const string16& database_name) { |
| std::vector<char> ret = KeyPrefix::EncodeEmpty(); |
| ret.push_back(kDatabaseNameTypeByte); |
| - EncodeStringWithLength(origin, &ret); |
| + EncodeStringWithLength(base::ASCIIToUTF16(origin_identifier), &ret); |
|
jsbell
2013/06/20 16:38:40
I haven't see anyone bother to tack "base::" on to
jamesr
2013/06/20 16:54:32
https://code.google.com/p/chromium/codesearch#chro
|
| EncodeStringWithLength(database_name, &ret); |
| return ret; |
| } |
| std::vector<char> DatabaseNameKey::EncodeMinKeyForOrigin( |
| - const string16& origin) { |
| - return Encode(origin, string16()); |
| + const std::string& origin_identifier) { |
| + return Encode(origin_identifier, string16()); |
| } |
| std::vector<char> DatabaseNameKey::EncodeStopKeyForOrigin( |
| - const string16& origin) { |
| + const std::string& origin_identifier) { |
| // just after origin in collation order |
| - return EncodeMinKeyForOrigin(origin + base::char16('\x01')); |
| + return EncodeMinKeyForOrigin(origin_identifier + '\x01'); |
| } |
| int DatabaseNameKey::Compare(const DatabaseNameKey& other) { |