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

Unified Diff: chrome/browser/password_manager/password_store.h

Issue 152683002: Passwords: Remove references to BrowserThread from PasswordStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more tests. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/password_store.h
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h
index d536ae9eae1ece74ee81ed2372d78fcd9270dfef..5f48c082cb894d8c74b706ea65de5f42e00227b4 100644
--- a/chrome/browser/password_manager/password_store.h
+++ b/chrome/browser/password_manager/password_store.h
@@ -103,7 +103,9 @@ class PasswordStore : public RefcountedBrowserContextKeyedService {
virtual ~Observer() {}
};
- PasswordStore();
+ explicit PasswordStore(
Garrett Casto 2014/02/03 15:56:46 No need for explicit.
Patrick Dubroy 2014/02/03 17:43:25 Whoops, added that when I was initially only passi
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner);
// Reimplement this to add custom initialization. Always call this too.
virtual bool Init();
@@ -175,10 +177,10 @@ class PasswordStore : public RefcountedBrowserContextKeyedService {
// Schedules the given |task| to be run on the PasswordStore's TaskRunner.
bool ScheduleTask(const base::Closure& task);
- // Get the TaskRunner to use for PasswordStore tasks.
+ // Get the TaskRunner to use for PasswordStore background tasks.
// By default, a SingleThreadTaskRunner on the DB thread is used, but
// subclasses can override.
- virtual scoped_refptr<base::SequencedTaskRunner> GetTaskRunner();
+ virtual scoped_refptr<base::SequencedTaskRunner> GetBackgroundTaskRunner();
// These will be run in PasswordStore's own thread.
// Synchronous implementation that reports usage metrics.
@@ -225,6 +227,14 @@ class PasswordStore : public RefcountedBrowserContextKeyedService {
// Log UMA stats for number of bulk deletions.
void LogStatsForBulkDeletion(int num_deletions);
+ // TaskRunner for tasks that run on the main PasswordStore thread (usually
Garrett Casto 2014/02/03 15:56:46 How about just "main thread" instead of "main Pass
Patrick Dubroy 2014/02/03 17:43:25 Done.
Patrick Dubroy 2014/02/03 17:43:25 Done.
+ // the UI thread).
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
Garrett Casto 2014/02/03 15:56:46 Not sure if I think that this is the right name. m
Patrick Dubroy 2014/02/03 17:43:25 Done.
+
+ // TaskRunner for the DB thread. By default, this is the task runner used for
+ // background tasks -- see |GetBackgroundTaskRunner|.
+ scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner_;
+
private:
// Schedule the given |func| to be run in the PasswordStore's own thread with
// responses delivered to |consumer| on the current thread.

Powered by Google App Engine
This is Rietveld 408576698