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

Unified Diff: chrome/browser/password_manager/password_store_default.cc

Issue 153943002: Eliminate BrowserThread usage from PasswordStoreDefault. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 10 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_default.cc
diff --git a/chrome/browser/password_manager/password_store_default.cc b/chrome/browser/password_manager/password_store_default.cc
index aa29ddb89f15b930883baec26a92d8847592301e..b4c2bf4266df30e76ad5c244e6eaa9524002842a 100644
--- a/chrome/browser/password_manager/password_store_default.cc
+++ b/chrome/browser/password_manager/password_store_default.cc
@@ -14,11 +14,9 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/pref_names.h"
-#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
using autofill::PasswordForm;
-using content::BrowserThread;
PasswordStoreDefault::PasswordStoreDefault(
scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
@@ -36,12 +34,12 @@ PasswordStoreDefault::~PasswordStoreDefault() {
}
void PasswordStoreDefault::ShutdownOnUIThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(main_thread_runner_->BelongsToCurrentThread());
profile_ = NULL;
}
void PasswordStoreDefault::ReportMetricsImpl() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
+ DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread());
login_db_->ReportMetrics();
}
@@ -122,12 +120,12 @@ void PasswordStoreDefault::GetBlacklistLoginsImpl(
bool PasswordStoreDefault::FillAutofillableLogins(
std::vector<PasswordForm*>* forms) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
+ DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread());
return login_db_->GetAutofillableLogins(forms);
}
bool PasswordStoreDefault::FillBlacklistLogins(
std::vector<PasswordForm*>* forms) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
+ DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread());
return login_db_->GetBlacklistLogins(forms);
}
« no previous file with comments | « chrome/browser/password_manager/password_store.cc ('k') | chrome/browser/password_manager/password_store_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698