OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 namespace password_manager { | 45 namespace password_manager { |
46 | 46 |
47 class PasswordManagerClient; | 47 class PasswordManagerClient; |
48 class PasswordStoreConsumer; | 48 class PasswordStoreConsumer; |
49 class PasswordSyncableService; | 49 class PasswordSyncableService; |
50 | 50 |
51 // Interface for storing form passwords in a platform-specific secure way. | 51 // Interface for storing form passwords in a platform-specific secure way. |
52 // The login request/manipulation API is not threadsafe and must be used | 52 // The login request/manipulation API is not threadsafe and must be used |
53 // from the UI thread. | 53 // from the UI thread. |
| 54 // Implementations, however, should carry out most tasks asynchronously on the |
| 55 // the DB thread: the base class provides functionality to facilitate this. |
| 56 // I/O heavy initialization should also be performed asynchronously on the DB |
| 57 // thread. If deferred initialization fails, all subsequent method calls should |
| 58 // fail without side effects, return no data, and trigger no notifications. |
54 // PasswordStoreSync is a hidden base class because only PasswordSyncableService | 59 // PasswordStoreSync is a hidden base class because only PasswordSyncableService |
55 // needs to access these methods. | 60 // needs to access these methods. |
56 class PasswordStore : protected PasswordStoreSync, | 61 class PasswordStore : protected PasswordStoreSync, |
57 public base::RefCountedThreadSafe<PasswordStore> { | 62 public base::RefCountedThreadSafe<PasswordStore> { |
58 public: | 63 public: |
59 // Whether or not it's acceptable for Chrome to request access to locked | 64 // Whether or not it's acceptable for Chrome to request access to locked |
60 // passwords, which requires prompting the user for permission. | 65 // passwords, which requires prompting the user for permission. |
61 enum AuthorizationPromptPolicy { | 66 enum AuthorizationPromptPolicy { |
62 ALLOW_PROMPT, | 67 ALLOW_PROMPT, |
63 DISALLOW_PROMPT | 68 DISALLOW_PROMPT |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 scoped_ptr<PasswordSyncableService> syncable_service_; | 305 scoped_ptr<PasswordSyncableService> syncable_service_; |
301 | 306 |
302 bool shutdown_called_; | 307 bool shutdown_called_; |
303 | 308 |
304 DISALLOW_COPY_AND_ASSIGN(PasswordStore); | 309 DISALLOW_COPY_AND_ASSIGN(PasswordStore); |
305 }; | 310 }; |
306 | 311 |
307 } // namespace password_manager | 312 } // namespace password_manager |
308 | 313 |
309 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_ | 314 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_ |
OLD | NEW |