| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_error_notifier_ash.h" | 5 #include "chrome/browser/signin/signin_error_notifier_ash.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "ash/system/system_notifier.h" | 9 #include "ash/system/system_notifier.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
| 97 chrome::AttemptUserExit(); | 97 chrome::AttemptUserExit(); |
| 98 #else | 98 #else |
| 99 LoginUIService* login_ui = LoginUIServiceFactory::GetForProfile(profile_); | 99 LoginUIService* login_ui = LoginUIServiceFactory::GetForProfile(profile_); |
| 100 if (login_ui->current_login_ui()) { | 100 if (login_ui->current_login_ui()) { |
| 101 login_ui->current_login_ui()->FocusUI(); | 101 login_ui->current_login_ui()->FocusUI(); |
| 102 return; | 102 return; |
| 103 } | 103 } |
| 104 | 104 |
| 105 // Find a browser instance or create one. | 105 // Find a browser instance or create one. |
| 106 chrome::ScopedTabbedBrowserDisplayer browser_displayer( | 106 chrome::ScopedTabbedBrowserDisplayer browser_displayer(profile_); |
| 107 profile_, chrome::HOST_DESKTOP_TYPE_ASH); | |
| 108 | 107 |
| 109 // Navigate to the sync setup subpage, which will launch a login page. | 108 // Navigate to the sync setup subpage, which will launch a login page. |
| 110 chrome::ShowSettingsSubPage(browser_displayer.browser(), | 109 chrome::ShowSettingsSubPage(browser_displayer.browser(), |
| 111 chrome::kSyncSetupSubPage); | 110 chrome::kSyncSetupSubPage); |
| 112 #endif | 111 #endif |
| 113 } | 112 } |
| 114 | 113 |
| 115 } // namespace | 114 } // namespace |
| 116 | 115 |
| 117 SigninErrorNotifier::SigninErrorNotifier(SigninErrorController* controller, | 116 SigninErrorNotifier::SigninErrorNotifier(SigninErrorController* controller, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 return l10n_util::GetStringUTF16( | 215 return l10n_util::GetStringUTF16( |
| 217 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); | 216 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); |
| 218 break; | 217 break; |
| 219 | 218 |
| 220 // Generic message for "other" errors. | 219 // Generic message for "other" errors. |
| 221 default: | 220 default: |
| 222 return l10n_util::GetStringUTF16( | 221 return l10n_util::GetStringUTF16( |
| 223 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); | 222 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); |
| 224 } | 223 } |
| 225 } | 224 } |
| OLD | NEW |