summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-29 20:35:19 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-29 20:35:19 +0000
commitddd231eaa03153f6d04894cceb0b4480755e1277 (patch)
treefaafed02945c1f8934e6e393ac0c6b094c303cdf /chrome/browser/sync
parentc5e30d8572ffae1e0d4fbb2fff765f9a8cbace77 (diff)
downloadchromium_src-ddd231eaa03153f6d04894cceb0b4480755e1277.zip
chromium_src-ddd231eaa03153f6d04894cceb0b4480755e1277.tar.gz
chromium_src-ddd231eaa03153f6d04894cceb0b4480755e1277.tar.bz2
Change a bunch of string types.
Started out just trying to change PrefService::GetString and ::SetString. This snowballed a little bit. Had to change a bunch of url strings in search_engines/ from wstring to string (some of them may be better off as GURLs, but UTF-8 is a step in the right direction, since that's what GURL uses internally, as well as externally via its setters/getters). TODO (later patch): things that ask for accepted languages should use std::string, not std::wstring. BUG=none TEST=try bots Review URL: http://codereview.chromium.org/2854015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51157 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/glue/preference_model_associator_unittest.cc16
-rw-r--r--chrome/browser/sync/profile_sync_service_preference_unittest.cc18
-rw-r--r--chrome/browser/sync/sync_setup_flow.cc2
3 files changed, 18 insertions, 18 deletions
diff --git a/chrome/browser/sync/glue/preference_model_associator_unittest.cc b/chrome/browser/sync/glue/preference_model_associator_unittest.cc
index 44b74d0..032f0ea 100644
--- a/chrome/browser/sync/glue/preference_model_associator_unittest.cc
+++ b/chrome/browser/sync/glue/preference_model_associator_unittest.cc
@@ -61,10 +61,10 @@ class AbstractPreferenceMergeTest : public testing::Test {
class ListPreferenceMergeTest : public AbstractPreferenceMergeTest {
protected:
ListPreferenceMergeTest() :
- server_url0_(L"http://example.com/server0"),
- server_url1_(L"http://example.com/server1"),
- local_url0_(L"http://example.com/local0"),
- local_url1_(L"http://example.com/local1") {}
+ server_url0_("http://example.com/server0"),
+ server_url1_("http://example.com/server1"),
+ local_url0_("http://example.com/local0"),
+ local_url1_("http://example.com/local1") {}
virtual void SetUp() {
AbstractPreferenceMergeTest::SetUp();
@@ -72,10 +72,10 @@ class ListPreferenceMergeTest : public AbstractPreferenceMergeTest {
server_url_list_.Append(Value::CreateStringValue(server_url1_));
}
- std::wstring server_url0_;
- std::wstring server_url1_;
- std::wstring local_url0_;
- std::wstring local_url1_;
+ std::string server_url0_;
+ std::string server_url1_;
+ std::string local_url0_;
+ std::string local_url1_;
ListValue server_url_list_;
};
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
index c64710d..7757516 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -39,12 +39,12 @@ class ProfileSyncServicePreferenceTest
: public AbstractProfileSyncServiceTest {
protected:
ProfileSyncServicePreferenceTest()
- : example_url0_(L"http://example.com/0"),
- example_url1_(L"http://example.com/1"),
- example_url2_(L"http://example.com/2"),
+ : example_url0_("http://example.com/0"),
+ example_url1_("http://example.com/1"),
+ example_url2_("http://example.com/2"),
not_synced_preference_name_(L"nonsense_pref_name"),
not_synced_preference_default_value_("default"),
- non_default_charset_value_(L"foo") {}
+ non_default_charset_value_("foo") {}
virtual void SetUp() {
profile_.reset(new TestingProfile());
@@ -188,12 +188,12 @@ class ProfileSyncServicePreferenceTest
PreferenceModelAssociator* model_associator_;
PreferenceChangeProcessor* change_processor_;
- std::wstring example_url0_;
- std::wstring example_url1_;
- std::wstring example_url2_;
+ std::string example_url0_;
+ std::string example_url1_;
+ std::string example_url2_;
std::wstring not_synced_preference_name_;
std::string not_synced_preference_default_value_;
- std::wstring non_default_charset_value_;
+ std::string non_default_charset_value_;
};
class AddPreferenceEntriesTask : public Task {
@@ -298,7 +298,7 @@ TEST_F(ProfileSyncServicePreferenceTest, ModelAssociationCloudHasData) {
scoped_ptr<const Value> value(GetSyncedValue(prefs::kHomePage));
ASSERT_TRUE(value.get());
- std::wstring string_value;
+ std::string string_value;
EXPECT_TRUE(static_cast<const StringValue*>(value.get())->
GetAsString(&string_value));
EXPECT_EQ(example_url1_, string_value);
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index 9afda35..2cecbc7 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -295,7 +295,7 @@ SyncSetupFlow::~SyncSetupFlow() {
void SyncSetupFlow::GetDialogSize(gfx::Size* size) const {
PrefService* prefs = service_->profile()->GetPrefs();
gfx::Font approximate_web_font = gfx::Font::CreateFont(
- prefs->GetString(prefs::kWebKitSansSerifFontFamily),
+ UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
prefs->GetInteger(prefs::kWebKitDefaultFontSize));
*size = gfx::GetLocalizedContentsSizeForFont(