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

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

Issue 196173023: [Password Manager] Remove dead profile migration code for GNOME/KWallet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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_x.cc
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc
index 40058df2f495a81535cc8afad0186537f972f34e..ce44e1bce1b6ac041804d59d681e6b26aab26319 100644
--- a/chrome/browser/password_manager/password_store_x.cc
+++ b/chrome/browser/password_manager/password_store_x.cc
@@ -260,42 +260,3 @@ ssize_t PasswordStoreX::MigrateLogins() {
STLDeleteElements(&forms);
return result;
}
-
-#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
-// static
-void PasswordStoreX::RegisterProfilePrefs(
- user_prefs::PrefRegistrySyncable* registry) {
- // Normally we should be on the UI thread here, but in tests we might not.
- registry->RegisterBooleanPref(
- prefs::kPasswordsUseLocalProfileId,
- // default: passwords don't use local ids
- false,
- user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
-}
-
-// static
-bool PasswordStoreX::PasswordsUseLocalProfileId(PrefService* prefs) {
- // Normally we should be on the UI thread here, but in tests we might not.
- return prefs->GetBoolean(prefs::kPasswordsUseLocalProfileId);
-}
-
-namespace {
-// This function is a hack to do something not entirely thread safe: the pref
-// service comes from the UI thread, but it's not ref counted. We keep a pointer
-// to it on the DB thread, and need to invoke a method on the UI thread. This
-// function does that for us without requiring ref counting the pref service.
-// TODO(mdm): Fix this if it becomes a problem. Given that this function will
-// be called once ever per profile, it probably will not cause a problem...
-void UISetPasswordsUseLocalProfileId(PrefService* prefs) {
- prefs->SetBoolean(prefs::kPasswordsUseLocalProfileId, true);
-}
-} // anonymous namespace
-
-// static
-void PasswordStoreX::SetPasswordsUseLocalProfileId(PrefService* prefs) {
- // This method should work on any thread, but we expect the DB thread.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&UISetPasswordsUseLocalProfileId, prefs));
-}
-#endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)

Powered by Google App Engine
This is Rietveld 408576698