Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: components/password_manager/core/browser/password_store.h

Issue 1192963002: Implement PasswordStoreProxyMac and SimplePasswordStoreMac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed the comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/observer_list_threadsafe.h" 13 #include "base/observer_list_threadsafe.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "components/password_manager/core/browser/password_store_change.h" 16 #include "components/password_manager/core/browser/password_store_change.h"
17 #include "components/password_manager/core/browser/password_store_sync.h" 17 #include "components/password_manager/core/browser/password_store_sync.h"
18 #include "components/password_manager/core/browser/statistics_table.h" 18 #include "components/password_manager/core/browser/statistics_table.h"
19 #include "sync/api/syncable_service.h" 19 #include "sync/api/syncable_service.h"
20 20
21 namespace autofill { 21 namespace autofill {
22 struct PasswordForm; 22 struct PasswordForm;
23 } 23 }
24 24
25 namespace syncer { 25 namespace syncer {
26 class SyncableService; 26 class SyncableService;
27 } 27 }
28 28
29 class PasswordStoreProxyMac;
30
29 namespace password_manager { 31 namespace password_manager {
30 32
31 class AffiliatedMatchHelper; 33 class AffiliatedMatchHelper;
32 class PasswordStoreConsumer; 34 class PasswordStoreConsumer;
33 class PasswordSyncableService; 35 class PasswordSyncableService;
34 36
35 // Interface for storing form passwords in a platform-specific secure way. 37 // Interface for storing form passwords in a platform-specific secure way.
36 // The login request/manipulation API is not threadsafe and must be used 38 // The login request/manipulation API is not threadsafe and must be used
37 // from the UI thread. 39 // from the UI thread.
38 // Implementations, however, should carry out most tasks asynchronously on a 40 // Implementations, however, should carry out most tasks asynchronously on a
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_; 285 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_;
284 286
285 // TaskRunner for the DB thread. By default, this is the task runner used for 287 // TaskRunner for the DB thread. By default, this is the task runner used for
286 // background tasks -- see |GetBackgroundTaskRunner|. 288 // background tasks -- see |GetBackgroundTaskRunner|.
287 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner_; 289 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner_;
288 290
289 private: 291 private:
290 FRIEND_TEST_ALL_PREFIXES(PasswordStoreTest, GetLoginImpl); 292 FRIEND_TEST_ALL_PREFIXES(PasswordStoreTest, GetLoginImpl);
291 FRIEND_TEST_ALL_PREFIXES(PasswordStoreTest, 293 FRIEND_TEST_ALL_PREFIXES(PasswordStoreTest,
292 UpdatePasswordsStoredForAffiliatedWebsites); 294 UpdatePasswordsStoredForAffiliatedWebsites);
295 // TODO(vasilii): remove this together with PasswordStoreProxyMac.
296 friend class ::PasswordStoreProxyMac;
293 297
294 // Schedule the given |func| to be run in the PasswordStore's own thread with 298 // Schedule the given |func| to be run in the PasswordStore's own thread with
295 // responses delivered to |consumer| on the current thread. 299 // responses delivered to |consumer| on the current thread.
296 void Schedule(void (PasswordStore::*func)(scoped_ptr<GetLoginsRequest>), 300 void Schedule(void (PasswordStore::*func)(scoped_ptr<GetLoginsRequest>),
297 PasswordStoreConsumer* consumer); 301 PasswordStoreConsumer* consumer);
298 302
299 // Wrapper method called on the destination thread (DB for non-mac) that 303 // Wrapper method called on the destination thread (DB for non-mac) that
300 // invokes |task| and then calls back into the source thread to notify 304 // invokes |task| and then calls back into the source thread to notify
301 // observers that the password store may have been modified via 305 // observers that the password store may have been modified via
302 // NotifyLoginsChanged(). Note that there is no guarantee that the called 306 // NotifyLoginsChanged(). Note that there is no guarantee that the called
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool is_propagating_password_changes_to_web_credentials_enabled_; 387 bool is_propagating_password_changes_to_web_credentials_enabled_;
384 388
385 bool shutdown_called_; 389 bool shutdown_called_;
386 390
387 DISALLOW_COPY_AND_ASSIGN(PasswordStore); 391 DISALLOW_COPY_AND_ASSIGN(PasswordStore);
388 }; 392 };
389 393
390 } // namespace password_manager 394 } // namespace password_manager
391 395
392 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_ 396 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/password_manager/core/browser/password_store_default.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698