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

Unified Diff: chrome/browser/signin/signin_names_io_thread_unittest.cc

Issue 120983002: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/signin/signin_names_io_thread.cc ('k') | chrome/browser/signin/signin_ui_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_names_io_thread_unittest.cc
diff --git a/chrome/browser/signin/signin_names_io_thread_unittest.cc b/chrome/browser/signin/signin_names_io_thread_unittest.cc
index 24156ce83ab9af620acb1faf0d3e896beb230b3a..f946c29e712839a84906ad0bdaabfdc41b9147aa 100644
--- a/chrome/browser/signin/signin_names_io_thread_unittest.cc
+++ b/chrome/browser/signin/signin_names_io_thread_unittest.cc
@@ -52,7 +52,8 @@ void SigninNamesOnIOThreadTest::TearDown() {
}
void SigninNamesOnIOThreadTest::SimulateSignin(const base::string16& email) {
- GoogleServiceSigninSuccessDetails details(UTF16ToUTF8(email), "password");
+ GoogleServiceSigninSuccessDetails details(
+ base::UTF16ToUTF8(email), "password");
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
content::Source<Profile>(NULL),
@@ -60,7 +61,7 @@ void SigninNamesOnIOThreadTest::SimulateSignin(const base::string16& email) {
}
void SigninNamesOnIOThreadTest::SimulateSignout(const base::string16& email) {
- GoogleServiceSignoutDetails details(UTF16ToUTF8(email));
+ GoogleServiceSignoutDetails details(base::UTF16ToUTF8(email));
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
content::Source<Profile>(NULL),
@@ -72,7 +73,8 @@ void SigninNamesOnIOThreadTest::AddNewProfile(const base::string16& name,
ProfileInfoCache* cache = testing_profile_manager_.profile_info_cache();
const base::FilePath& user_data_dir = cache->GetUserDataDir();
#if defined(OS_POSIX)
- const base::FilePath profile_dir = user_data_dir.Append(UTF16ToUTF8(name));
+ const base::FilePath profile_dir =
+ user_data_dir.Append(base::UTF16ToUTF8(name));
#else
const base::FilePath profile_dir = user_data_dir.Append(name);
#endif
@@ -86,7 +88,7 @@ TEST_F(SigninNamesOnIOThreadTest, Basic) {
}
TEST_F(SigninNamesOnIOThreadTest, Signin) {
- const base::string16 email = UTF8ToUTF16("foo@gmail.com");
+ const base::string16 email = base::UTF8ToUTF16("foo@gmail.com");
SimulateSignin(email);
const SigninNamesOnIOThread::EmailSet& emails = signin_names_.GetEmails();
@@ -95,7 +97,7 @@ TEST_F(SigninNamesOnIOThreadTest, Signin) {
}
TEST_F(SigninNamesOnIOThreadTest, Signout) {
- const base::string16 email = UTF8ToUTF16("foo@gmail.com");
+ const base::string16 email = base::UTF8ToUTF16("foo@gmail.com");
SimulateSignin(email);
SimulateSignout(email);
@@ -104,9 +106,9 @@ TEST_F(SigninNamesOnIOThreadTest, Signout) {
}
TEST_F(SigninNamesOnIOThreadTest, HandleUnknownSignout) {
- const base::string16 email = UTF8ToUTF16("foo@gmail.com");
+ const base::string16 email = base::UTF8ToUTF16("foo@gmail.com");
SimulateSignin(email);
- SimulateSignout(UTF8ToUTF16("bar@gmail.com"));
+ SimulateSignout(base::UTF8ToUTF16("bar@gmail.com"));
const SigninNamesOnIOThread::EmailSet& emails = signin_names_.GetEmails();
ASSERT_EQ(1u, emails.size());
@@ -115,11 +117,11 @@ TEST_F(SigninNamesOnIOThreadTest, HandleUnknownSignout) {
TEST_F(SigninNamesOnIOThreadTest, StartWithConnectedProfiles) {
// Setup a couple of connected profiles, and one unconnected.
- const base::string16 email1 = UTF8ToUTF16("foo@gmail.com");
- const base::string16 email2 = UTF8ToUTF16("bar@gmail.com");
- AddNewProfile(UTF8ToUTF16("foo"), email1);
- AddNewProfile(UTF8ToUTF16("bar"), email2);
- AddNewProfile(UTF8ToUTF16("toto"), base::string16());
+ const base::string16 email1 = base::UTF8ToUTF16("foo@gmail.com");
+ const base::string16 email2 = base::UTF8ToUTF16("bar@gmail.com");
+ AddNewProfile(base::UTF8ToUTF16("foo"), email1);
+ AddNewProfile(base::UTF8ToUTF16("bar"), email2);
+ AddNewProfile(base::UTF8ToUTF16("toto"), base::string16());
SigninNamesOnIOThread signin_names;
« no previous file with comments | « chrome/browser/signin/signin_names_io_thread.cc ('k') | chrome/browser/signin/signin_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698