| 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/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 profile->GetPrefs()->SetInteger( | 170 profile->GetPrefs()->SetInteger( |
| 171 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1); | 171 prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 void ShowSigninErrorLearnMorePage(Profile* profile) { | 175 void ShowSigninErrorLearnMorePage(Profile* profile) { |
| 176 static const char kSigninErrorLearnMoreUrl[] = | 176 static const char kSigninErrorLearnMoreUrl[] = |
| 177 "https://support.google.com/chrome/answer/1181420?"; | 177 "https://support.google.com/chrome/answer/1181420?"; |
| 178 chrome::NavigateParams params( | 178 chrome::NavigateParams params( |
| 179 profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK); | 179 profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK); |
| 180 params.disposition = NEW_FOREGROUND_TAB; | 180 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
| 181 chrome::Navigate(¶ms); | 181 chrome::Navigate(¶ms); |
| 182 } | 182 } |
| 183 | 183 |
| 184 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) { | 184 std::string GetDisplayEmail(Profile* profile, const std::string& account_id) { |
| 185 AccountTrackerService* account_tracker = | 185 AccountTrackerService* account_tracker = |
| 186 AccountTrackerServiceFactory::GetForProfile(profile); | 186 AccountTrackerServiceFactory::GetForProfile(profile); |
| 187 std::string email = account_tracker->GetAccountInfo(account_id).email; | 187 std::string email = account_tracker->GetAccountInfo(account_id).email; |
| 188 if (email.empty()) { | 188 if (email.empty()) { |
| 189 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED, | 189 DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED, |
| 190 account_tracker->GetMigrationState()); | 190 account_tracker->GetMigrationState()); |
| 191 return account_id; | 191 return account_id; |
| 192 } | 192 } |
| 193 return email; | 193 return email; |
| 194 } | 194 } |
| 195 | 195 |
| 196 } // namespace signin_ui_util | 196 } // namespace signin_ui_util |
| OLD | NEW |