| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Implements PasswordStore on top of the OS X Keychain, with an internal | 24 // Implements PasswordStore on top of the OS X Keychain, with an internal |
| 25 // database for extra metadata. For an overview of the interactions with the | 25 // database for extra metadata. For an overview of the interactions with the |
| 26 // Keychain, as well as the rationale for some of the behaviors, see the | 26 // Keychain, as well as the rationale for some of the behaviors, see the |
| 27 // Keychain integration design doc: | 27 // Keychain integration design doc: |
| 28 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key
chain-integration | 28 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key
chain-integration |
| 29 class PasswordStoreMac : public PasswordStore { | 29 class PasswordStoreMac : public PasswordStore { |
| 30 public: | 30 public: |
| 31 // Takes ownership of |keychain| and |login_db|, both of which must be | 31 // Takes ownership of |keychain| and |login_db|, both of which must be |
| 32 // non-NULL. | 32 // non-NULL. |
| 33 PasswordStoreMac(crypto::AppleKeychain* keychain, LoginDatabase* login_db); | 33 PasswordStoreMac( |
| 34 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, |
| 35 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
| 36 crypto::AppleKeychain* keychain, |
| 37 LoginDatabase* login_db); |
| 34 | 38 |
| 35 // Initializes |thread_| and |notification_service_|. | 39 // Initializes |thread_| and |notification_service_|. |
| 36 virtual bool Init() OVERRIDE; | 40 virtual bool Init() OVERRIDE; |
| 37 | 41 |
| 38 virtual void ShutdownOnUIThread() OVERRIDE; | 42 virtual void ShutdownOnUIThread() OVERRIDE; |
| 39 | 43 |
| 40 protected: | 44 protected: |
| 41 virtual ~PasswordStoreMac(); | 45 virtual ~PasswordStoreMac(); |
| 42 | 46 |
| 43 virtual scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() OVERRIDE; | 47 virtual scoped_refptr<base::SequencedTaskRunner> |
| 48 GetBackgroundTaskRunner() OVERRIDE; |
| 44 | 49 |
| 45 private: | 50 private: |
| 46 virtual void ReportMetricsImpl() OVERRIDE; | 51 virtual void ReportMetricsImpl() OVERRIDE; |
| 47 virtual void AddLoginImpl(const autofill::PasswordForm& form) OVERRIDE; | 52 virtual void AddLoginImpl(const autofill::PasswordForm& form) OVERRIDE; |
| 48 virtual void UpdateLoginImpl( | 53 virtual void UpdateLoginImpl( |
| 49 const autofill::PasswordForm& form) OVERRIDE; | 54 const autofill::PasswordForm& form) OVERRIDE; |
| 50 virtual void RemoveLoginImpl( | 55 virtual void RemoveLoginImpl( |
| 51 const autofill::PasswordForm& form) OVERRIDE; | 56 const autofill::PasswordForm& form) OVERRIDE; |
| 52 virtual void RemoveLoginsCreatedBetweenImpl( | 57 virtual void RemoveLoginsCreatedBetweenImpl( |
| 53 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; | 58 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 scoped_ptr<base::Thread> thread_; | 101 scoped_ptr<base::Thread> thread_; |
| 97 | 102 |
| 98 // Since we aren't running on a well-known thread but still want to send out | 103 // Since we aren't running on a well-known thread but still want to send out |
| 99 // notifications, we need to run our own service. | 104 // notifications, we need to run our own service. |
| 100 scoped_ptr<content::NotificationService> notification_service_; | 105 scoped_ptr<content::NotificationService> notification_service_; |
| 101 | 106 |
| 102 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); | 107 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); |
| 103 }; | 108 }; |
| 104 | 109 |
| 105 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ | 110 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ |
| OLD | NEW |