| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/manage_passwords_view_utils.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 password_origin_url, std::string()); | 136 password_origin_url, std::string()); |
| 137 *title = l10n_util::GetStringFUTF16( | 137 *title = l10n_util::GetStringFUTF16( |
| 138 IDS_MANAGE_PASSWORDS_TITLE_DIFFERENT_DOMAIN, formatted_url); | 138 IDS_MANAGE_PASSWORDS_TITLE_DIFFERENT_DOMAIN, formatted_url); |
| 139 } else { | 139 } else { |
| 140 *title = l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_TITLE); | 140 *title = l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_TITLE); |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 | 143 |
| 144 void GetAccountChooserDialogTitleTextAndLinkRange( | 144 void GetAccountChooserDialogTitleTextAndLinkRange( |
| 145 bool is_smartlock_branding_enabled, | 145 bool is_smartlock_branding_enabled, |
| 146 bool many_accounts, |
| 146 base::string16* title, | 147 base::string16* title, |
| 147 gfx::Range* title_link_range) { | 148 gfx::Range* title_link_range) { |
| 149 int string_id = many_accounts |
| 150 ? IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE_MANY_ACCOUNTS |
| 151 : IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE_ONE_ACCOUNT; |
| 148 GetBrandedTextAndLinkRange(is_smartlock_branding_enabled, | 152 GetBrandedTextAndLinkRange(is_smartlock_branding_enabled, |
| 149 IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE, | 153 string_id, string_id, |
| 150 IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE, | |
| 151 title, title_link_range); | 154 title, title_link_range); |
| 152 } | 155 } |
| 153 | 156 |
| 154 void GetBrandedTextAndLinkRange(bool is_smartlock_branding_enabled, | 157 void GetBrandedTextAndLinkRange(bool is_smartlock_branding_enabled, |
| 155 int smartlock_string_id, | 158 int smartlock_string_id, |
| 156 int default_string_id, | 159 int default_string_id, |
| 157 base::string16* out_string, | 160 base::string16* out_string, |
| 158 gfx::Range* link_range) { | 161 gfx::Range* link_range) { |
| 159 if (is_smartlock_branding_enabled) { | 162 if (is_smartlock_branding_enabled) { |
| 160 size_t offset; | 163 size_t offset; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 177 : form.username_value; | 180 : form.username_value; |
| 178 } | 181 } |
| 179 | 182 |
| 180 bool IsSyncingAutosignSetting(Profile* profile) { | 183 bool IsSyncingAutosignSetting(Profile* profile) { |
| 181 const ProfileSyncService* sync_service = | 184 const ProfileSyncService* sync_service = |
| 182 ProfileSyncServiceFactory::GetForProfile(profile); | 185 ProfileSyncServiceFactory::GetForProfile(profile); |
| 183 return (sync_service && sync_service->IsFirstSetupComplete() && | 186 return (sync_service && sync_service->IsFirstSetupComplete() && |
| 184 sync_service->IsSyncActive() && | 187 sync_service->IsSyncActive() && |
| 185 sync_service->GetActiveDataTypes().Has(syncer::PRIORITY_PREFERENCES)); | 188 sync_service->GetActiveDataTypes().Has(syncer::PRIORITY_PREFERENCES)); |
| 186 } | 189 } |
| OLD | NEW |