| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/passwords/password_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/passwords/password_dialog_controller_impl.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/sync/profile_sync_service_factory.h" | 8 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 9 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" |
| 10 #include "chrome/browser/ui/passwords/password_dialog_prompts.h" | 10 #include "chrome/browser/ui/passwords/password_dialog_prompts.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 PasswordDialogControllerImpl::GetAccoutChooserTitle() const { | 76 PasswordDialogControllerImpl::GetAccoutChooserTitle() const { |
| 77 std::pair<base::string16, gfx::Range> result; | 77 std::pair<base::string16, gfx::Range> result; |
| 78 GetAccountChooserDialogTitleTextAndLinkRange( | 78 GetAccountChooserDialogTitleTextAndLinkRange( |
| 79 IsSmartLockBrandingEnabled(profile_), | 79 IsSmartLockBrandingEnabled(profile_), |
| 80 &result.first, | 80 &result.first, |
| 81 &result.second); | 81 &result.second); |
| 82 return result; | 82 return result; |
| 83 } | 83 } |
| 84 | 84 |
| 85 base::string16 PasswordDialogControllerImpl::GetAutoSigninPromoTitle() const { | 85 base::string16 PasswordDialogControllerImpl::GetAutoSigninPromoTitle() const { |
| 86 int message_id = IsSyncingSettings(profile_) | 86 int message_id = IsSyncingAutosignSetting(profile_) |
| 87 ? IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_MANY_DEVICES | 87 ? IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_MANY_DEVICES |
| 88 : IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_LOCAL_DEVICE; | 88 : IDS_AUTO_SIGNIN_FIRST_RUN_TITLE_LOCAL_DEVICE; |
| 89 return l10n_util::GetStringUTF16(message_id); | 89 return l10n_util::GetStringUTF16(message_id); |
| 90 } | 90 } |
| 91 | 91 |
| 92 std::pair<base::string16, gfx::Range> | 92 std::pair<base::string16, gfx::Range> |
| 93 PasswordDialogControllerImpl::GetAutoSigninText() const { | 93 PasswordDialogControllerImpl::GetAutoSigninText() const { |
| 94 std::pair<base::string16, gfx::Range> result; | 94 std::pair<base::string16, gfx::Range> result; |
| 95 GetBrandedTextAndLinkRange(IsSmartLockBrandingEnabled(profile_), | 95 GetBrandedTextAndLinkRange(IsSmartLockBrandingEnabled(profile_), |
| 96 IDS_AUTO_SIGNIN_FIRST_RUN_SMART_LOCK_TEXT, | 96 IDS_AUTO_SIGNIN_FIRST_RUN_SMART_LOCK_TEXT, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void PasswordDialogControllerImpl::ResetDialog() { | 135 void PasswordDialogControllerImpl::ResetDialog() { |
| 136 if (account_chooser_dialog_) { | 136 if (account_chooser_dialog_) { |
| 137 account_chooser_dialog_->ControllerGone(); | 137 account_chooser_dialog_->ControllerGone(); |
| 138 account_chooser_dialog_ = nullptr; | 138 account_chooser_dialog_ = nullptr; |
| 139 } | 139 } |
| 140 if (autosignin_dialog_) { | 140 if (autosignin_dialog_) { |
| 141 autosignin_dialog_->ControllerGone(); | 141 autosignin_dialog_->ControllerGone(); |
| 142 autosignin_dialog_ = nullptr; | 142 autosignin_dialog_ = nullptr; |
| 143 } | 143 } |
| 144 } | 144 } |
| OLD | NEW |