OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/mac/mac_util.h" | 14 #include "base/mac/mac_util.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "base/task.h" | 18 #include "base/task.h" |
19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
20 #include "chrome/browser/keychain_mac.h" | 20 #include "chrome/browser/keychain_mac.h" |
21 #include "chrome/browser/password_manager/login_database.h" | 21 #include "chrome/browser/password_manager/login_database.h" |
22 #include "chrome/browser/password_manager/password_store_change.h" | 22 #include "chrome/browser/password_manager/password_store_change.h" |
23 #include "chrome/common/chrome_notification_types.h" | 23 #include "chrome/common/chrome_notification_types.h" |
24 #include "content/browser/notification_service_impl.h" | 24 #include "content/public/browser/notification_service.h" |
25 | 25 |
26 using webkit_glue::PasswordForm; | 26 using webkit_glue::PasswordForm; |
27 | 27 |
28 // Utility class to handle the details of constructing and running a keychain | 28 // Utility class to handle the details of constructing and running a keychain |
29 // search from a set of attributes. | 29 // search from a set of attributes. |
30 class KeychainSearch { | 30 class KeychainSearch { |
31 public: | 31 public: |
32 explicit KeychainSearch(const MacKeychain& keychain); | 32 explicit KeychainSearch(const MacKeychain& keychain); |
33 ~KeychainSearch(); | 33 ~KeychainSearch(); |
34 | 34 |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 const std::vector<PasswordForm*>& forms) { | 1009 const std::vector<PasswordForm*>& forms) { |
1010 MacKeychainPasswordFormAdapter owned_keychain_adapter(keychain_.get()); | 1010 MacKeychainPasswordFormAdapter owned_keychain_adapter(keychain_.get()); |
1011 owned_keychain_adapter.SetFindsOnlyOwnedItems(true); | 1011 owned_keychain_adapter.SetFindsOnlyOwnedItems(true); |
1012 for (std::vector<PasswordForm*>::const_iterator i = forms.begin(); | 1012 for (std::vector<PasswordForm*>::const_iterator i = forms.begin(); |
1013 i != forms.end(); ++i) { | 1013 i != forms.end(); ++i) { |
1014 owned_keychain_adapter.RemovePassword(**i); | 1014 owned_keychain_adapter.RemovePassword(**i); |
1015 } | 1015 } |
1016 } | 1016 } |
1017 | 1017 |
1018 void PasswordStoreMac::CreateNotificationService() { | 1018 void PasswordStoreMac::CreateNotificationService() { |
1019 notification_service_.reset(new NotificationServiceImpl); | 1019 notification_service_.reset(content::NotificationService::Create()); |
1020 } | 1020 } |
OLD | NEW |