summaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-03 20:11:26 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-03 20:11:26 +0000
commitfcf75d4016c7a2dcad1d2415009eff1e0eef4468 (patch)
treed41b14e6526a822b66d692f60dc8f648a2afb3cd /sql
parent426d1c945bcb1a8479d92a7dd023c34cbbc7a261 (diff)
downloadchromium_src-fcf75d4016c7a2dcad1d2415009eff1e0eef4468.zip
chromium_src-fcf75d4016c7a2dcad1d2415009eff1e0eef4468.tar.gz
chromium_src-fcf75d4016c7a2dcad1d2415009eff1e0eef4468.tar.bz2
Convert string16 to base::string16 in content.
BUG= Review URL: https://codereview.chromium.org/102593002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql')
-rw-r--r--sql/statement.cc14
-rw-r--r--sql/statement.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/sql/statement.cc b/sql/statement.cc
index 4f5e17f..985497e 100644
--- a/sql/statement.cc
+++ b/sql/statement.cc
@@ -149,7 +149,7 @@ bool Statement::BindString(int col, const std::string& val) {
SQLITE_TRANSIENT));
}
-bool Statement::BindString16(int col, const string16& value) {
+bool Statement::BindString16(int col, const base::string16& value) {
return BindString(col, UTF16ToUTF8(value));
}
@@ -235,12 +235,12 @@ std::string Statement::ColumnString(int col) const {
return result;
}
-string16 Statement::ColumnString16(int col) const {
+base::string16 Statement::ColumnString16(int col) const {
if (!CheckValid())
- return string16();
+ return base::string16();
std::string s = ColumnString(col);
- return !s.empty() ? UTF8ToUTF16(s) : string16();
+ return !s.empty() ? UTF8ToUTF16(s) : base::string16();
}
int Statement::ColumnByteLength(int col) const {
@@ -271,16 +271,16 @@ bool Statement::ColumnBlobAsString(int col, std::string* blob) {
return true;
}
-bool Statement::ColumnBlobAsString16(int col, string16* val) const {
+bool Statement::ColumnBlobAsString16(int col, base::string16* val) const {
if (!CheckValid())
return false;
const void* data = ColumnBlob(col);
- size_t len = ColumnByteLength(col) / sizeof(char16);
+ size_t len = ColumnByteLength(col) / sizeof(base::char16);
val->resize(len);
if (val->size() != len)
return false;
- val->assign(reinterpret_cast<const char16*>(data), len);
+ val->assign(reinterpret_cast<const base::char16*>(data), len);
return true;
}
diff --git a/sql/statement.h b/sql/statement.h
index acf89e7..e192e60 100644
--- a/sql/statement.h
+++ b/sql/statement.h
@@ -108,7 +108,7 @@ class SQL_EXPORT Statement {
bool BindDouble(int col, double val);
bool BindCString(int col, const char* val);
bool BindString(int col, const std::string& val);
- bool BindString16(int col, const string16& value);
+ bool BindString16(int col, const base::string16& value);
bool BindBlob(int col, const void* value, int value_len);
// Retrieving ----------------------------------------------------------------
@@ -131,7 +131,7 @@ class SQL_EXPORT Statement {
int64 ColumnInt64(int col) const;
double ColumnDouble(int col) const;
std::string ColumnString(int col) const;
- string16 ColumnString16(int col) const;
+ base::string16 ColumnString16(int col) const;
// When reading a blob, you can get a raw pointer to the underlying data,
// along with the length, or you can just ask us to copy the blob into a
@@ -139,7 +139,7 @@ class SQL_EXPORT Statement {
int ColumnByteLength(int col) const;
const void* ColumnBlob(int col) const;
bool ColumnBlobAsString(int col, std::string* blob);
- bool ColumnBlobAsString16(int col, string16* val) const;
+ bool ColumnBlobAsString16(int col, base::string16* val) const;
bool ColumnBlobAsVector(int col, std::vector<char>* val) const;
bool ColumnBlobAsVector(int col, std::vector<unsigned char>* val) const;