| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 *link_range = gfx::Range(); | 166 *link_range = gfx::Range(); |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 base::string16 GetDisplayUsername(const autofill::PasswordForm& form) { | 170 base::string16 GetDisplayUsername(const autofill::PasswordForm& form) { |
| 171 return form.username_value.empty() | 171 return form.username_value.empty() |
| 172 ? l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_EMPTY_LOGIN) | 172 ? l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_EMPTY_LOGIN) |
| 173 : form.username_value; | 173 : form.username_value; |
| 174 } | 174 } |
| 175 | 175 |
| 176 bool IsSyncingSettings(Profile* profile) { | 176 bool IsSyncingAutosignSetting(Profile* profile) { |
| 177 const ProfileSyncService* sync_service = | 177 const ProfileSyncService* sync_service = |
| 178 ProfileSyncServiceFactory::GetForProfile(profile); | 178 ProfileSyncServiceFactory::GetForProfile(profile); |
| 179 return (sync_service && sync_service->IsFirstSetupComplete() && | 179 return (sync_service && sync_service->IsFirstSetupComplete() && |
| 180 sync_service->IsSyncActive() && | 180 sync_service->IsSyncActive() && |
| 181 sync_service->GetActiveDataTypes().Has(syncer::PREFERENCES)); | 181 sync_service->GetActiveDataTypes().Has(syncer::PRIORITY_PREFERENCES)); |
| 182 } | 182 } |
| OLD | NEW |