| OLD | NEW |
| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 true, false, profile_, create_status_); | 310 true, false, profile_, create_status_); |
| 311 } else { | 311 } else { |
| 312 OnClientOAuthSuccessAndBrowserOpened(result, profile_, create_status_); | 312 OnClientOAuthSuccessAndBrowserOpened(result, profile_, create_status_); |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 | 315 |
| 316 void InlineSigninHelper::OnClientOAuthSuccessAndBrowserOpened( | 316 void InlineSigninHelper::OnClientOAuthSuccessAndBrowserOpened( |
| 317 const ClientOAuthResult& result, | 317 const ClientOAuthResult& result, |
| 318 Profile* profile, | 318 Profile* profile, |
| 319 Profile::CreateStatus status) { | 319 Profile::CreateStatus status) { |
| 320 UnlockProfileAndHideLoginUI(profile_->GetPath(), handler_.get()); | 320 if (signin::IsForceSigninEnabled()) |
| 321 UnlockProfileAndHideLoginUI(profile_->GetPath(), handler_.get()); |
| 321 content::WebContents* contents = NULL; | 322 content::WebContents* contents = NULL; |
| 322 Browser* browser = NULL; | 323 Browser* browser = NULL; |
| 323 if (handler_) { | 324 if (handler_) { |
| 324 contents = handler_->web_ui()->GetWebContents(); | 325 contents = handler_->web_ui()->GetWebContents(); |
| 325 browser = handler_->GetDesktopBrowser(); | 326 browser = handler_->GetDesktopBrowser(); |
| 326 } | 327 } |
| 327 | 328 |
| 328 AboutSigninInternals* about_signin_internals = | 329 AboutSigninInternals* about_signin_internals = |
| 329 AboutSigninInternalsFactory::GetForProfile(profile_); | 330 AboutSigninInternalsFactory::GetForProfile(profile_); |
| 330 about_signin_internals->OnRefreshTokenReceived("Successful"); | 331 about_signin_internals->OnRefreshTokenReceived("Successful"); |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 } | 989 } |
| 989 | 990 |
| 990 if (show_account_management) { | 991 if (show_account_management) { |
| 991 browser->window()->ShowAvatarBubbleFromAvatarButton( | 992 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 992 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 993 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
| 993 signin::ManageAccountsParams(), | 994 signin::ManageAccountsParams(), |
| 994 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); | 995 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); |
| 995 } | 996 } |
| 996 } | 997 } |
| 997 } | 998 } |
| OLD | NEW |