| 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/ui/autofill/password_generation_popup_controller_impl.h
" | 5 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 web_contents), | 93 web_contents), |
| 94 password_selected_(false), | 94 password_selected_(false), |
| 95 display_password_(false), | 95 display_password_(false), |
| 96 weak_ptr_factory_(this) { | 96 weak_ptr_factory_(this) { |
| 97 controller_common_.SetKeyPressCallback( | 97 controller_common_.SetKeyPressCallback( |
| 98 base::Bind(&PasswordGenerationPopupControllerImpl::HandleKeyPressEvent, | 98 base::Bind(&PasswordGenerationPopupControllerImpl::HandleKeyPressEvent, |
| 99 base::Unretained(this))); | 99 base::Unretained(this))); |
| 100 | 100 |
| 101 int link_id = IDS_MANAGE_PASSWORDS_LINK; | 101 int link_id = IDS_MANAGE_PASSWORDS_LINK; |
| 102 int help_text_id = IDS_PASSWORD_GENERATION_PROMPT; | 102 int help_text_id = IDS_PASSWORD_GENERATION_PROMPT; |
| 103 const ProfileSyncService* sync_service = | 103 const browser_sync::ProfileSyncService* sync_service = |
| 104 ProfileSyncServiceFactory::GetForProfile( | 104 ProfileSyncServiceFactory::GetForProfile( |
| 105 Profile::FromBrowserContext(web_contents->GetBrowserContext())); | 105 Profile::FromBrowserContext(web_contents->GetBrowserContext())); |
| 106 if (password_bubble_experiment::IsSmartLockBrandingEnabled(sync_service)) { | 106 if (password_bubble_experiment::IsSmartLockBrandingEnabled(sync_service)) { |
| 107 help_text_id = IDS_PASSWORD_GENERATION_SMART_LOCK_PROMPT; | 107 help_text_id = IDS_PASSWORD_GENERATION_SMART_LOCK_PROMPT; |
| 108 link_id = IDS_PASSWORD_MANAGER_SMART_LOCK_FOR_PASSWORDS; | 108 link_id = IDS_PASSWORD_MANAGER_SMART_LOCK_FOR_PASSWORDS; |
| 109 } | 109 } |
| 110 | 110 |
| 111 base::string16 link = l10n_util::GetStringUTF16(link_id); | 111 base::string16 link = l10n_util::GetStringUTF16(link_id); |
| 112 size_t offset; | 112 size_t offset; |
| 113 help_text_ = l10n_util::GetStringFUTF16(help_text_id, link, &offset); | 113 help_text_ = l10n_util::GetStringFUTF16(help_text_id, link, &offset); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { | 315 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { |
| 316 return help_text_; | 316 return help_text_; |
| 317 } | 317 } |
| 318 | 318 |
| 319 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { | 319 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { |
| 320 return link_range_; | 320 return link_range_; |
| 321 } | 321 } |
| 322 | 322 |
| 323 } // namespace autofill | 323 } // namespace autofill |
| OLD | NEW |