OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/password_manager/password_store_mac.h" | 5 #include "chrome/browser/password_manager/password_store_mac.h" |
6 #include "chrome/browser/password_manager/password_store_mac_internal.h" | 6 #include "chrome/browser/password_manager/password_store_mac_internal.h" |
7 | 7 |
8 #include <CoreServices/CoreServices.h> | 8 #include <CoreServices/CoreServices.h> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 return PasswordStore::Init(); | 738 return PasswordStore::Init(); |
739 } | 739 } |
740 | 740 |
741 void PasswordStoreMac::ScheduleTask(Task* task) { | 741 void PasswordStoreMac::ScheduleTask(Task* task) { |
742 if (thread_.get()) { | 742 if (thread_.get()) { |
743 thread_->message_loop()->PostTask(FROM_HERE, task); | 743 thread_->message_loop()->PostTask(FROM_HERE, task); |
744 } | 744 } |
745 } | 745 } |
746 | 746 |
747 void PasswordStoreMac::ReportMetricsImpl() { | 747 void PasswordStoreMac::ReportMetricsImpl() { |
| 748 login_metadata_db_->ReportMetrics(); |
748 } | 749 } |
749 | 750 |
750 void PasswordStoreMac::AddLoginImpl(const PasswordForm& form) { | 751 void PasswordStoreMac::AddLoginImpl(const PasswordForm& form) { |
751 if (AddToKeychainIfNecessary(form)) { | 752 if (AddToKeychainIfNecessary(form)) { |
752 if (login_metadata_db_->AddLogin(form)) { | 753 if (login_metadata_db_->AddLogin(form)) { |
753 PasswordStoreChangeList changes; | 754 PasswordStoreChangeList changes; |
754 changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form)); | 755 changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form)); |
755 NotificationService::current()->Notify( | 756 NotificationService::current()->Notify( |
756 NotificationType::LOGINS_CHANGED, | 757 NotificationType::LOGINS_CHANGED, |
757 NotificationService::AllSources(), | 758 NotificationService::AllSources(), |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 owned_keychain_adapter.SetFindsOnlyOwnedItems(true); | 982 owned_keychain_adapter.SetFindsOnlyOwnedItems(true); |
982 for (std::vector<PasswordForm*>::const_iterator i = forms.begin(); | 983 for (std::vector<PasswordForm*>::const_iterator i = forms.begin(); |
983 i != forms.end(); ++i) { | 984 i != forms.end(); ++i) { |
984 owned_keychain_adapter.RemovePassword(**i); | 985 owned_keychain_adapter.RemovePassword(**i); |
985 } | 986 } |
986 } | 987 } |
987 | 988 |
988 void PasswordStoreMac::CreateNotificationService() { | 989 void PasswordStoreMac::CreateNotificationService() { |
989 notification_service_.reset(new NotificationService); | 990 notification_service_.reset(new NotificationService); |
990 } | 991 } |
OLD | NEW |