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

Side by Side Diff: chrome/browser/signin/signin_ui_util.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_ui_util.h" 5 #include "chrome/browser/signin/signin_ui_util.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 break; 155 break;
156 } 156 }
157 } 157 }
158 158
159 void InitializePrefsForProfile(Profile* profile) { 159 void InitializePrefsForProfile(Profile* profile) {
160 // Suppresses the upgrade tutorial for a new profile. 160 // Suppresses the upgrade tutorial for a new profile.
161 if (profile->IsNewProfile() && switches::IsNewAvatarMenu()) { 161 if (profile->IsNewProfile() && switches::IsNewAvatarMenu()) {
162 profile->GetPrefs()->SetInteger( 162 profile->GetPrefs()->SetInteger(
163 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1); 163 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1);
164 #ifdef NOT_YET_MON_BOY
Mike Lerman 2015/04/08 14:45:26 Ummmm... is this supposed to be here?
Roger Tawa OOO till Jul 10th 2015/04/08 20:24:21 Oops, that was never meant for other humans to see
165 profile->GetPrefs()->SetInteger(
166 prefs::kAccountIdMigrationState, AccountTrackerService::MIGRATION_DONE);
167 #endif
164 } 168 }
165 } 169 }
166 170
167 void ShowSigninErrorLearnMorePage(Profile* profile) { 171 void ShowSigninErrorLearnMorePage(Profile* profile) {
168 static const char kSigninErrorLearnMoreUrl[] = 172 static const char kSigninErrorLearnMoreUrl[] =
169 "https://support.google.com/chrome/answer/1181420?"; 173 "https://support.google.com/chrome/answer/1181420?";
170 chrome::NavigateParams params( 174 chrome::NavigateParams params(
171 profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK); 175 profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK);
172 params.disposition = NEW_FOREGROUND_TAB; 176 params.disposition = NEW_FOREGROUND_TAB;
173 chrome::Navigate(&params); 177 chrome::Navigate(&params);
174 } 178 }
175 179
176 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) { 180 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) {
177 AccountTrackerService* account_tracker = 181 AccountTrackerService* account_tracker =
178 AccountTrackerServiceFactory::GetForProfile(profile); 182 AccountTrackerServiceFactory::GetForProfile(profile);
179 std::string email = account_tracker->GetAccountInfo(account_id).email; 183 std::string email = account_tracker->GetAccountInfo(account_id).email;
180 if (email.empty()) { 184 if (email.empty()) {
181 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED, 185 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED,
182 account_tracker->GetMigrationState()); 186 account_tracker->GetMigrationState());
183 return account_id; 187 return account_id;
184 } 188 }
185 return email; 189 return email;
186 } 190 }
187 191
188 } // namespace signin_ui_util 192 } // namespace signin_ui_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698