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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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(¶ms); | 177 chrome::Navigate(¶ms); |
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 |
OLD | NEW |