| 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 if (profile_manager->GetProfileAttributesStorage() | 846 if (profile_manager->GetProfileAttributesStorage() |
| 847 .GetProfileAttributesWithPath(params.profile_path, &entry)) { | 847 .GetProfileAttributesWithPath(params.profile_path, &entry)) { |
| 848 entry->SetIsSigninRequired(false); | 848 entry->SetIsSigninRequired(false); |
| 849 } | 849 } |
| 850 } | 850 } |
| 851 } | 851 } |
| 852 | 852 |
| 853 if (params.handler) | 853 if (params.handler) |
| 854 params.handler-> | 854 params.handler-> |
| 855 web_ui()->CallJavascriptFunction("inline.login.closeDialog"); | 855 web_ui()->CallJavascriptFunction("inline.login.closeDialog"); |
| 856 | |
| 857 CloseModalSigninIfNeeded(params.handler); | |
| 858 } | 856 } |
| 859 | 857 |
| 860 void InlineLoginHandlerImpl::HandleLoginError(const std::string& error_msg) { | 858 void InlineLoginHandlerImpl::HandleLoginError(const std::string& error_msg) { |
| 861 SyncStarterCallback(OneClickSigninSyncStarter::SYNC_SETUP_FAILURE); | 859 SyncStarterCallback(OneClickSigninSyncStarter::SYNC_SETUP_FAILURE); |
| 862 Browser* browser = GetDesktopBrowser(); | 860 Browser* browser = GetDesktopBrowser(); |
| 863 Profile* profile = Profile::FromWebUI(web_ui()); | 861 Profile* profile = Profile::FromWebUI(web_ui()); |
| 864 | 862 |
| 865 CloseModalSigninIfNeeded(this); | 863 CloseModalSigninIfNeeded(this); |
| 866 if (browser && !error_msg.empty()) { | 864 if (browser && !error_msg.empty()) { |
| 867 LoginUIServiceFactory::GetForProfile(profile)-> | 865 LoginUIServiceFactory::GetForProfile(profile)-> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 } | 918 } |
| 921 | 919 |
| 922 if (show_account_management) { | 920 if (show_account_management) { |
| 923 browser->window()->ShowAvatarBubbleFromAvatarButton( | 921 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 924 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 922 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
| 925 signin::ManageAccountsParams(), | 923 signin::ManageAccountsParams(), |
| 926 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); | 924 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); |
| 927 } | 925 } |
| 928 } | 926 } |
| 929 } | 927 } |
| OLD | NEW |