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

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

Issue 1307093004: Remove references to IsNewAvatarMenu since the flag was removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback Created 5 years, 2 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 default: 155 default:
156 if (status_label) { 156 if (status_label) {
157 status_label->assign(l10n_util::GetStringUTF16( 157 status_label->assign(l10n_util::GetStringUTF16(
158 IDS_SYNC_ERROR_SIGNING_IN)); 158 IDS_SYNC_ERROR_SIGNING_IN));
159 } 159 }
160 break; 160 break;
161 } 161 }
162 } 162 }
163 163
164 void InitializePrefsForProfile(Profile* profile) { 164 void InitializePrefsForProfile(Profile* profile) {
165 if (profile->IsNewProfile() && switches::IsNewAvatarMenu()) { 165 if (profile->IsNewProfile()) {
166 // Suppresses the upgrade tutorial for a new profile. 166 // Suppresses the upgrade tutorial for a new profile.
167 profile->GetPrefs()->SetInteger( 167 profile->GetPrefs()->SetInteger(
168 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1); 168 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1);
169 } 169 }
170 } 170 }
171 171
172 void ShowSigninErrorLearnMorePage(Profile* profile) { 172 void ShowSigninErrorLearnMorePage(Profile* profile) {
173 static const char kSigninErrorLearnMoreUrl[] = 173 static const char kSigninErrorLearnMoreUrl[] =
174 "https://support.google.com/chrome/answer/1181420?"; 174 "https://support.google.com/chrome/answer/1181420?";
175 chrome::NavigateParams params( 175 chrome::NavigateParams params(
176 profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK); 176 profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK);
177 params.disposition = NEW_FOREGROUND_TAB; 177 params.disposition = NEW_FOREGROUND_TAB;
178 chrome::Navigate(&params); 178 chrome::Navigate(&params);
179 } 179 }
180 180
181 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) { 181 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) {
182 AccountTrackerService* account_tracker = 182 AccountTrackerService* account_tracker =
183 AccountTrackerServiceFactory::GetForProfile(profile); 183 AccountTrackerServiceFactory::GetForProfile(profile);
184 std::string email = account_tracker->GetAccountInfo(account_id).email; 184 std::string email = account_tracker->GetAccountInfo(account_id).email;
185 if (email.empty()) { 185 if (email.empty()) {
186 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED, 186 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED,
187 account_tracker->GetMigrationState()); 187 account_tracker->GetMigrationState());
188 return account_id; 188 return account_id;
189 } 189 }
190 return email; 190 return email;
191 } 191 }
192 192
193 } // namespace signin_ui_util 193 } // namespace signin_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_promo.cc ('k') | chrome/browser/ui/browser_command_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698