| 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 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "chrome/browser/password_manager/login_database.h" | 14 #include "chrome/browser/password_manager/login_database.h" |
| 15 #include "chrome/browser/password_manager/password_store.h" | 15 #include "chrome/browser/password_manager/password_store.h" |
| 16 | 16 |
| 17 class MacKeychain; | 17 class MacKeychain; |
| 18 |
| 19 namespace content { |
| 18 class NotificationService; | 20 class NotificationService; |
| 21 } |
| 19 | 22 |
| 20 // Implements PasswordStore on top of the OS X Keychain, with an internal | 23 // Implements PasswordStore on top of the OS X Keychain, with an internal |
| 21 // database for extra metadata. For an overview of the interactions with the | 24 // database for extra metadata. For an overview of the interactions with the |
| 22 // Keychain, as well as the rationale for some of the behaviors, see the | 25 // Keychain, as well as the rationale for some of the behaviors, see the |
| 23 // Keychain integration design doc: | 26 // Keychain integration design doc: |
| 24 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key
chain-integration | 27 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key
chain-integration |
| 25 class PasswordStoreMac : public PasswordStore { | 28 class PasswordStoreMac : public PasswordStore { |
| 26 public: | 29 public: |
| 27 // Takes ownership of |keychain| and |login_db|, both of which must be | 30 // Takes ownership of |keychain| and |login_db|, both of which must be |
| 28 // non-NULL. | 31 // non-NULL. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void CreateNotificationService(); | 85 void CreateNotificationService(); |
| 83 | 86 |
| 84 scoped_ptr<MacKeychain> keychain_; | 87 scoped_ptr<MacKeychain> keychain_; |
| 85 scoped_ptr<LoginDatabase> login_metadata_db_; | 88 scoped_ptr<LoginDatabase> login_metadata_db_; |
| 86 | 89 |
| 87 // Thread that the synchronous methods are run on. | 90 // Thread that the synchronous methods are run on. |
| 88 scoped_ptr<base::Thread> thread_; | 91 scoped_ptr<base::Thread> thread_; |
| 89 | 92 |
| 90 // Since we aren't running on a well-known thread but still want to send out | 93 // Since we aren't running on a well-known thread but still want to send out |
| 91 // notifications, we need to run our own service. | 94 // notifications, we need to run our own service. |
| 92 scoped_ptr<NotificationService> notification_service_; | 95 scoped_ptr<content::NotificationService> notification_service_; |
| 93 | 96 |
| 94 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); | 97 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); |
| 95 }; | 98 }; |
| 96 | 99 |
| 97 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ | 100 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ |
| OLD | NEW |