OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_bubble_model.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 ScopedVector<const autofill::PasswordForm> DeepCopyForms( | 55 ScopedVector<const autofill::PasswordForm> DeepCopyForms( |
56 const std::vector<const autofill::PasswordForm*>& forms) { | 56 const std::vector<const autofill::PasswordForm*>& forms) { |
57 ScopedVector<const autofill::PasswordForm> result; | 57 ScopedVector<const autofill::PasswordForm> result; |
58 result.reserve(forms.size()); | 58 result.reserve(forms.size()); |
59 std::transform(forms.begin(), forms.end(), std::back_inserter(result), | 59 std::transform(forms.begin(), forms.end(), std::back_inserter(result), |
60 [](const autofill::PasswordForm* form) { | 60 [](const autofill::PasswordForm* form) { |
61 return new autofill::PasswordForm(*form); | 61 return new autofill::PasswordForm(*form); |
62 }); | 62 }); |
63 return result.Pass(); | 63 return result; |
64 } | 64 } |
65 | 65 |
66 password_bubble_experiment::SmartLockBranding GetSmartLockBrandingState( | 66 password_bubble_experiment::SmartLockBranding GetSmartLockBrandingState( |
67 Profile* profile) { | 67 Profile* profile) { |
68 const ProfileSyncService* sync_service = | 68 const ProfileSyncService* sync_service = |
69 ProfileSyncServiceFactory::GetForProfile(profile); | 69 ProfileSyncServiceFactory::GetForProfile(profile); |
70 return password_bubble_experiment::GetSmartLockBrandingState(sync_service); | 70 return password_bubble_experiment::GetSmartLockBrandingState(sync_service); |
71 } | 71 } |
72 | 72 |
73 } // namespace | 73 } // namespace |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 return metrics_util::NO_UPDATE_SUBMISSION; | 439 return metrics_util::NO_UPDATE_SUBMISSION; |
440 } | 440 } |
441 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) | 441 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) |
442 return metrics_util::NO_UPDATE_SUBMISSION; | 442 return metrics_util::NO_UPDATE_SUBMISSION; |
443 if (password_overridden_) | 443 if (password_overridden_) |
444 return update_events[3][behavior]; | 444 return update_events[3][behavior]; |
445 if (ShouldShowMultipleAccountUpdateUI()) | 445 if (ShouldShowMultipleAccountUpdateUI()) |
446 return update_events[2][behavior]; | 446 return update_events[2][behavior]; |
447 return update_events[1][behavior]; | 447 return update_events[1][behavior]; |
448 } | 448 } |
OLD | NEW |