summaryrefslogtreecommitdiffstats
path: root/chrome/browser/webdata
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 21:15:35 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 21:15:35 +0000
commita61c5c9bb6524d77c30b6a18f542c0e4616ee7bc (patch)
treec1afa473cffdaea857f181ba0788e60212649f30 /chrome/browser/webdata
parent0eb90137036cf765397a69f04f5c6695679fd8c0 (diff)
downloadchromium_src-a61c5c9bb6524d77c30b6a18f542c0e4616ee7bc.zip
chromium_src-a61c5c9bb6524d77c30b6a18f542c0e4616ee7bc.tar.gz
chromium_src-a61c5c9bb6524d77c30b6a18f542c0e4616ee7bc.tar.bz2
Remove wstring from TemplateURL and friends.
BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6322001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r--chrome/browser/webdata/web_database.cc16
-rw-r--r--chrome/browser/webdata/web_database_unittest.cc16
2 files changed, 16 insertions, 16 deletions
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc
index 2400c04..6e4a3fb 100644
--- a/chrome/browser/webdata/web_database.cc
+++ b/chrome/browser/webdata/web_database.cc
@@ -179,8 +179,8 @@ const char* kBuiltinKeywordVersion = "Builtin Keyword Version";
const size_t kMaxDataLength = 1024;
void BindURLToStatement(const TemplateURL& url, sql::Statement* s) {
- s->BindString(0, WideToUTF8(url.short_name()));
- s->BindString(1, WideToUTF8(url.keyword()));
+ s->BindString(0, UTF16ToUTF8(url.short_name()));
+ s->BindString(1, UTF16ToUTF8(url.keyword()));
GURL favicon_url = url.GetFavIconURL();
if (!favicon_url.is_valid()) {
s->BindString(2, std::string());
@@ -866,9 +866,9 @@ bool WebDatabase::GetKeywords(std::vector<TemplateURL*>* urls) {
std::string tmp;
tmp = s.ColumnString(1);
DCHECK(!tmp.empty());
- template_url->set_short_name(UTF8ToWide(tmp));
+ template_url->set_short_name(UTF8ToUTF16(tmp));
- template_url->set_keyword(UTF8ToWide(s.ColumnString(2)));
+ template_url->set_keyword(UTF8ToUTF16(s.ColumnString(2)));
tmp = s.ColumnString(3);
if (!tmp.empty())
@@ -2203,8 +2203,8 @@ sql::InitStatus WebDatabase::MigrateOldVersionsAsNeeded(){
"INSERT INTO credit_cards_temp "
"SELECT label,unique_id,name_on_card,type,card_number,"
"expiration_month,expiration_year,verification_code,0,"
- "shipping_address,card_number_encrypted,verification_code_encrypted "
- "FROM credit_cards")) {
+ "shipping_address,card_number_encrypted,"
+ "verification_code_encrypted FROM credit_cards")) {
LOG(WARNING) << "Unable to update web database to version 27.";
NOTREACHED();
return sql::INIT_FAILURE;
@@ -2509,8 +2509,8 @@ sql::InitStatus WebDatabase::MigrateOldVersionsAsNeeded(){
if (!db_.Execute(
"INSERT INTO autofill_profiles_temp "
"SELECT guid, label, first_name, middle_name, last_name, email, "
- "company_name, address_line_1, address_line_2, city, state, zipcode, "
- "country, phone, fax, date_modified "
+ "company_name, address_line_1, address_line_2, city, state, "
+ "zipcode, country, phone, fax, date_modified "
"FROM autofill_profiles")) {
LOG(WARNING) << "Unable to update web database to version 32.";
NOTREACHED();
diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc
index dc38100..41489e9 100644
--- a/chrome/browser/webdata/web_database_unittest.cc
+++ b/chrome/browser/webdata/web_database_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -305,8 +305,8 @@ TEST_F(WebDatabaseTest, Keywords) {
ASSERT_EQ(sql::INIT_OK, db.Init(file_));
TemplateURL template_url;
- template_url.set_short_name(L"short_name");
- template_url.set_keyword(L"keyword");
+ template_url.set_short_name(ASCIIToUTF16("short_name"));
+ template_url.set_keyword(ASCIIToUTF16("keyword"));
GURL favicon_url("http://favicon.url/");
GURL originating_url("http://google.com/");
template_url.SetFavIconURL(favicon_url);
@@ -398,8 +398,8 @@ TEST_F(WebDatabaseTest, UpdateKeyword) {
ASSERT_EQ(sql::INIT_OK, db.Init(file_));
TemplateURL template_url;
- template_url.set_short_name(L"short_name");
- template_url.set_keyword(L"keyword");
+ template_url.set_short_name(ASCIIToUTF16("short_name"));
+ template_url.set_keyword(ASCIIToUTF16("keyword"));
GURL favicon_url("http://favicon.url/");
GURL originating_url("http://originating.url/");
template_url.SetFavIconURL(favicon_url);
@@ -414,7 +414,7 @@ TEST_F(WebDatabaseTest, UpdateKeyword) {
GURL originating_url2("http://originating.url/");
template_url.set_originating_url(originating_url2);
template_url.set_autogenerate_keyword(true);
- EXPECT_EQ(L"url", template_url.keyword());
+ EXPECT_EQ(ASCIIToUTF16("url"), template_url.keyword());
template_url.add_input_encoding("Shift_JIS");
set_prepopulate_id(&template_url, 5);
set_logo_id(&template_url, 2000);
@@ -468,8 +468,8 @@ TEST_F(WebDatabaseTest, KeywordWithNoFavicon) {
ASSERT_EQ(sql::INIT_OK, db.Init(file_));
TemplateURL template_url;
- template_url.set_short_name(L"short_name");
- template_url.set_keyword(L"keyword");
+ template_url.set_short_name(ASCIIToUTF16("short_name"));
+ template_url.set_keyword(ASCIIToUTF16("keyword"));
template_url.SetURL("http://url/", 0, 0);
template_url.set_safe_for_autoreplace(true);
SetID(-100, &template_url);