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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 2762173003: Remove IsNewProfileManagement and EnableNewProfileManagementForTesting (Closed)
Patch Set: Fix compile (add back an include) Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/webui/signin/inline_login_handler_impl.h" 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 signin::GetAccessPointForPromoURL(current_url_); 227 signin::GetAccessPointForPromoURL(current_url_);
228 signin_metrics::Reason reason = 228 signin_metrics::Reason reason =
229 signin::GetSigninReasonForPromoURL(current_url_); 229 signin::GetSigninReasonForPromoURL(current_url_);
230 230
231 SigninManager* signin_manager = SigninManagerFactory::GetForProfile(profile_); 231 SigninManager* signin_manager = SigninManagerFactory::GetForProfile(profile_);
232 std::string primary_email = 232 std::string primary_email =
233 signin_manager->GetAuthenticatedAccountInfo().email; 233 signin_manager->GetAuthenticatedAccountInfo().email;
234 if (gaia::AreEmailsSame(email_, primary_email) && 234 if (gaia::AreEmailsSame(email_, primary_email) &&
235 (reason == signin_metrics::Reason::REASON_REAUTHENTICATION || 235 (reason == signin_metrics::Reason::REASON_REAUTHENTICATION ||
236 reason == signin_metrics::Reason::REASON_UNLOCK) && 236 reason == signin_metrics::Reason::REASON_UNLOCK) &&
237 switches::IsNewProfileManagement() && !password_.empty() && 237 !password_.empty() && profiles::IsLockAvailable(profile_)) {
238 profiles::IsLockAvailable(profile_)) {
239 LocalAuth::SetLocalAuthCredentials(profile_, password_); 238 LocalAuth::SetLocalAuthCredentials(profile_, password_);
240 } 239 }
241 240
242 if (reason == signin_metrics::Reason::REASON_REAUTHENTICATION || 241 if (reason == signin_metrics::Reason::REASON_REAUTHENTICATION ||
243 reason == signin_metrics::Reason::REASON_UNLOCK || 242 reason == signin_metrics::Reason::REASON_UNLOCK ||
244 reason == signin_metrics::Reason::REASON_ADD_SECONDARY_ACCOUNT) { 243 reason == signin_metrics::Reason::REASON_ADD_SECONDARY_ACCOUNT) {
245 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)-> 244 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->
246 UpdateCredentials(account_id, result.refresh_token); 245 UpdateCredentials(account_id, result.refresh_token);
247 246
248 if (signin::IsAutoCloseEnabledInURL(current_url_)) { 247 if (signin::IsAutoCloseEnabledInURL(current_url_)) {
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 875
877 if (show_account_management) { 876 if (show_account_management) {
878 browser->window()->ShowAvatarBubbleFromAvatarButton( 877 browser->window()->ShowAvatarBubbleFromAvatarButton(
879 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, 878 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
880 signin::ManageAccountsParams(), 879 signin::ManageAccountsParams(),
881 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN, 880 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN,
882 false); 881 false);
883 } 882 }
884 } 883 }
885 } 884 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698