summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 00:05:30 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 00:05:30 +0000
commit116a63ca96e18cbdd92f56d7d23c152eebf8c149 (patch)
treef3df3e73efdc2387a7223b149091c19c240f163e
parent6d13507663233a9c1e322e8a3d487dd30ee5c9d3 (diff)
downloadchromium_src-116a63ca96e18cbdd92f56d7d23c152eebf8c149.zip
chromium_src-116a63ca96e18cbdd92f56d7d23c152eebf8c149.tar.gz
chromium_src-116a63ca96e18cbdd92f56d7d23c152eebf8c149.tar.bz2
Merge 78170 - Workaround deadlock with password sync/GNOME Keyring by re-enabling password
sync and using the old default password store by default. This is temporary until we're able to land a real fix for the deadlock. BUG=72499 TEST=Run chrome on linux, see passwords get synced. Review URL: http://codereview.chromium.org/6696009 TBR=atwilson@chromium.org Review URL: http://codereview.chromium.org/6711022 git-svn-id: svn://svn.chromium.org/chrome/branches/696/src@78636 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/profiles/profile_impl.cc6
-rw-r--r--chrome/browser/sync/profile_sync_factory_impl.cc4
-rw-r--r--chrome/browser/sync/profile_sync_factory_impl_unittest.cc8
-rw-r--r--chrome/common/chrome_switches.cc5
-rw-r--r--chrome/common/chrome_switches.h9
-rw-r--r--chrome/test/live_sync/live_sync_test.cc3
6 files changed, 4 insertions, 31 deletions
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 205ea06..f5999935 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -1004,13 +1004,13 @@ void ProfileImpl::CreatePasswordStore() {
desktop_env = base::nix::DESKTOP_ENVIRONMENT_KDE4;
} else if (store_type == "gnome") {
desktop_env = base::nix::DESKTOP_ENVIRONMENT_GNOME;
- } else if (store_type == "basic") {
- desktop_env = base::nix::DESKTOP_ENVIRONMENT_OTHER;
- } else { // Detect the store to use automatically.
+ } else if (store_type == "detect") { // Detect the store to use automatically.
scoped_ptr<base::Environment> env(base::Environment::Create());
desktop_env = base::nix::GetDesktopEnvironment(env.get());
VLOG(1) << "Password storage detected desktop environment: "
<< base::nix::GetDesktopEnvironmentName(desktop_env);
+ } else {
+ desktop_env = base::nix::DESKTOP_ENVIRONMENT_OTHER;
}
scoped_ptr<PasswordStoreX::NativeBackend> backend;
diff --git a/chrome/browser/sync/profile_sync_factory_impl.cc b/chrome/browser/sync/profile_sync_factory_impl.cc
index 6391aa5..27bacf7 100644
--- a/chrome/browser/sync/profile_sync_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_factory_impl.cc
@@ -116,13 +116,9 @@ ProfileSyncService* ProfileSyncFactoryImpl::CreateProfileSyncService(
new ExtensionDataTypeController(this, profile_, pss));
}
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
- if (command_line_->HasSwitch(switches::kEnableSyncPasswords)) {
-#else
// Password sync is enabled by default. Register unless explicitly
// disabled.
if (!command_line_->HasSwitch(switches::kDisableSyncPasswords)) {
-#endif
pss->RegisterDataTypeController(
new PasswordDataTypeController(this, profile_, pss));
}
diff --git a/chrome/browser/sync/profile_sync_factory_impl_unittest.cc b/chrome/browser/sync/profile_sync_factory_impl_unittest.cc
index 30e6df0..93836ce 100644
--- a/chrome/browser/sync/profile_sync_factory_impl_unittest.cc
+++ b/chrome/browser/sync/profile_sync_factory_impl_unittest.cc
@@ -42,11 +42,7 @@ class ProfileSyncFactoryImplTest : public testing::Test {
datatypes.push_back(syncable::EXTENSIONS);
datatypes.push_back(syncable::APPS);
datatypes.push_back(syncable::AUTOFILL_PROFILE);
-// TODO(mdm): re-enable this test on Linux/BSD/etc. once we make password sync
-// compatible with GNOME Keyring.
-#if !defined(OS_POSIX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
datatypes.push_back(syncable::PASSWORDS);
-#endif
return datatypes;
}
@@ -137,11 +133,7 @@ TEST_F(ProfileSyncFactoryImplTest, CreatePSSDisableAutofillProfile) {
syncable::AUTOFILL_PROFILE);
}
-// TODO(mdm): re-enable this test on Linux/BSD/etc. once we make password sync
-// compatible with GNOME Keyring.
-#if !defined(OS_POSIX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
TEST_F(ProfileSyncFactoryImplTest, CreatePSSDisablePasswords) {
TestSwitchDisablesType(switches::kDisableSyncPasswords,
syncable::PASSWORDS);
}
-#endif
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 64f34fe..e0bc02d 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -340,13 +340,8 @@ const char kDisableSyncBookmarks[] = "disable-sync-bookmarks";
// Disable syncing of extensions.
const char kDisableSyncExtensions[] = "disable-sync-extensions";
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
-// Enable syncing browser passwords.
-const char kEnableSyncPasswords[] = "enable-sync-passwords";
-#else
// Disable syncing browser passwords.
const char kDisableSyncPasswords[] = "disable-sync-passwords";
-#endif
// Disable syncing of preferences.
const char kDisableSyncPreferences[] = "disable-sync-preferences";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 7f6bace..bb8feb9 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -109,6 +109,7 @@ extern const char kDisableSyncAutofill[];
extern const char kDisableSyncAutofillProfile[];
extern const char kDisableSyncBookmarks[];
extern const char kDisableSyncExtensions[];
+extern const char kDisableSyncPasswords[];
extern const char kDisableSyncPreferences[];
extern const char kDisableSyncThemes[];
extern const char kDisableTabbedOptions[];
@@ -347,14 +348,6 @@ extern const char kPasswordStore[];
#endif
#endif
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
-// Linux, mostly, but also BSDs and such. Password syncing and GNOME Keyring
-// don't play together at the moment so we require explicit opt-in for it.
-extern const char kEnableSyncPasswords[];
-#else
-extern const char kDisableSyncPasswords[];
-#endif
-
#if !defined(OS_MACOSX)
extern const char kKioskMode[];
#endif
diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc
index b366790..e47979f 100644
--- a/chrome/test/live_sync/live_sync_test.cc
+++ b/chrome/test/live_sync/live_sync_test.cc
@@ -183,9 +183,6 @@ void LiveSyncTest::SetUpCommandLine(CommandLine* cl) {
// See http://code.google.com/p/chromium/wiki/LinuxPasswordStorage.
if (!cl->HasSwitch(switches::kPasswordStore))
cl->AppendSwitchASCII(switches::kPasswordStore, "basic");
- // TODO(mdm): Remove this once password sync is enabled on Linux.
- if (!cl->HasSwitch(switches::kEnableSyncPasswords))
- cl->AppendSwitch(switches::kEnableSyncPasswords);
#endif
}