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

Side by Side Diff: chrome/browser/signin/signin_names_io_thread.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 6 years, 12 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/signin_names_io_thread.h" 5 #include "chrome/browser/signin/signin_names_io_thread.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void SigninNamesOnIOThread::Observe( 58 void SigninNamesOnIOThread::Observe(
59 int type, 59 int type,
60 const content::NotificationSource& source, 60 const content::NotificationSource& source,
61 const content::NotificationDetails& details) { 61 const content::NotificationDetails& details) {
62 CheckOnUIThread(); 62 CheckOnUIThread();
63 63
64 switch (type) { 64 switch (type) {
65 case chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL: { 65 case chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL: {
66 const GoogleServiceSigninSuccessDetails* signin_details = 66 const GoogleServiceSigninSuccessDetails* signin_details =
67 content::Details<GoogleServiceSigninSuccessDetails>(details).ptr(); 67 content::Details<GoogleServiceSigninSuccessDetails>(details).ptr();
68 PostTaskToIOThread(type, UTF8ToUTF16(signin_details->username)); 68 PostTaskToIOThread(type, base::UTF8ToUTF16(signin_details->username));
69 break; 69 break;
70 } 70 }
71 case chrome::NOTIFICATION_GOOGLE_SIGNED_OUT: { 71 case chrome::NOTIFICATION_GOOGLE_SIGNED_OUT: {
72 const GoogleServiceSignoutDetails* signout_details = 72 const GoogleServiceSignoutDetails* signout_details =
73 content::Details<GoogleServiceSignoutDetails>(details).ptr(); 73 content::Details<GoogleServiceSignoutDetails>(details).ptr();
74 PostTaskToIOThread(type, UTF8ToUTF16(signout_details->username)); 74 PostTaskToIOThread(type, base::UTF8ToUTF16(signout_details->username));
75 break; 75 break;
76 } 76 }
77 default: 77 default:
78 NOTREACHED() << "Unexpected type=" << type; 78 NOTREACHED() << "Unexpected type=" << type;
79 } 79 }
80 } 80 }
81 81
82 void SigninNamesOnIOThread::CheckOnIOThread() const { 82 void SigninNamesOnIOThread::CheckOnIOThread() const {
83 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 83 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
84 } 84 }
(...skipping 20 matching lines...) Expand all
105 void SigninNamesOnIOThread::UpdateOnIOThread( 105 void SigninNamesOnIOThread::UpdateOnIOThread(
106 int type, 106 int type,
107 const base::string16& email) { 107 const base::string16& email) {
108 CheckOnIOThread(); 108 CheckOnIOThread();
109 if (type == chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL) { 109 if (type == chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL) {
110 emails_.insert(email); 110 emails_.insert(email);
111 } else { 111 } else {
112 emails_.erase(email); 112 emails_.erase(email);
113 } 113 }
114 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager.cc ('k') | chrome/browser/signin/signin_names_io_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698