| OLD | NEW |
| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 if (profile->IsNewProfile() && switches::IsNewAvatarMenu()) { | 164 if (profile->IsNewProfile() && switches::IsNewAvatarMenu()) { |
| 165 profile->GetPrefs()->SetInteger( | 165 profile->GetPrefs()->SetInteger( |
| 166 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1); | 166 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1); |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 void ShowSigninErrorLearnMorePage(Profile* profile) { | 170 void ShowSigninErrorLearnMorePage(Profile* profile) { |
| 171 static const char kSigninErrorLearnMoreUrl[] = | 171 static const char kSigninErrorLearnMoreUrl[] = |
| 172 "https://support.google.com/chrome/answer/1181420?"; | 172 "https://support.google.com/chrome/answer/1181420?"; |
| 173 chrome::NavigateParams params( | 173 chrome::NavigateParams params( |
| 174 profile, GURL(kSigninErrorLearnMoreUrl), content::PAGE_TRANSITION_LINK); | 174 profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK); |
| 175 params.disposition = NEW_FOREGROUND_TAB; | 175 params.disposition = NEW_FOREGROUND_TAB; |
| 176 chrome::Navigate(¶ms); | 176 chrome::Navigate(¶ms); |
| 177 } | 177 } |
| 178 | 178 |
| 179 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) { | 179 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) { |
| 180 AccountTrackerService* account_tracker = | 180 AccountTrackerService* account_tracker = |
| 181 AccountTrackerServiceFactory::GetForProfile(profile); | 181 AccountTrackerServiceFactory::GetForProfile(profile); |
| 182 std::string email = account_tracker->GetAccountInfo(account_id).email; | 182 std::string email = account_tracker->GetAccountInfo(account_id).email; |
| 183 if (email.empty()) { | 183 if (email.empty()) { |
| 184 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED, | 184 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED, |
| 185 account_tracker->GetMigrationState()); | 185 account_tracker->GetMigrationState()); |
| 186 return account_id; | 186 return account_id; |
| 187 } | 187 } |
| 188 return email; | 188 return email; |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace signin_ui_util | 191 } // namespace signin_ui_util |
| OLD | NEW |