summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-04 00:07:07 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-04 00:07:07 +0000
commit065105cae3aad43ce57b7625da68d23f8e762f6b (patch)
tree467525cf1d67c137be4bd8d924d786d6b1bc70bf
parent46ad67f67ce02fcd505c8ab1616f1be13ac32169 (diff)
downloadchromium_src-065105cae3aad43ce57b7625da68d23f8e762f6b.zip
chromium_src-065105cae3aad43ce57b7625da68d23f8e762f6b.tar.gz
chromium_src-065105cae3aad43ce57b7625da68d23f8e762f6b.tar.bz2
Revert 261551 "Enable supervised users password sync/import on C..."
[ Reason for revert: seems to have caused browsertest failures: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%282%29/builds/22838 ] > Enable supervised users password sync/import on ChromeOS > > TBR=nkostylev@chromium.org > > BUG=282464, 244472 > > Review URL: https://codereview.chromium.org/224343003 TBR=antrim@chromium.org Review URL: https://codereview.chromium.org/224723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261593 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc6
-rw-r--r--chrome/browser/chromeos/login/managed/supervised_user_authentication.cc8
-rw-r--r--chromeos/chromeos_switches.cc3
-rw-r--r--chromeos/chromeos_switches.h1
4 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc b/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc
index 5d263c7..d16a7eb 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc
+++ b/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc
@@ -6,6 +6,7 @@
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/shell.h"
+#include "base/command_line.h"
#include "base/rand_util.h"
#include "base/values.h"
#include "chrome/browser/chromeos/camera_detector.h"
@@ -25,6 +26,7 @@
#include "chrome/browser/managed_mode/managed_user_shared_settings_service_factory.h"
#include "chrome/browser/managed_mode/managed_user_sync_service.h"
#include "chrome/browser/managed_mode/managed_user_sync_service_factory.h"
+#include "chrome/common/chrome_switches.h"
#include "chromeos/network/network_state.h"
#include "content/public/browser/browser_thread.h"
#include "grit/generated_resources.h"
@@ -341,6 +343,10 @@ void LocallyManagedUserCreationScreen::OnManagerFullyAuthenticated(
last_page_ = kNameOfNewUserParametersScreen;
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (!command_line->HasSwitch(::switches::kAllowCreateExistingManagedUsers))
+ return;
+
ManagedUserSyncServiceFactory::GetForProfile(manager_profile)->
GetManagedUsersAsync(base::Bind(
&LocallyManagedUserCreationScreen::OnGetManagedUsers,
diff --git a/chrome/browser/chromeos/login/managed/supervised_user_authentication.cc b/chrome/browser/chromeos/login/managed/supervised_user_authentication.cc
index 87478c6..cbfba6f 100644
--- a/chrome/browser/chromeos/login/managed/supervised_user_authentication.cc
+++ b/chrome/browser/chromeos/login/managed/supervised_user_authentication.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
#include "base/base64.h"
+#include "base/command_line.h"
#include "base/json/json_file_value_serializer.h"
#include "base/macros.h"
#include "base/metrics/histogram.h"
@@ -16,6 +17,7 @@
#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/signed_secret.pb.h"
#include "content/public/browser/browser_thread.h"
#include "crypto/hmac.h"
@@ -135,7 +137,11 @@ void OnPasswordDataLoaded(
SupervisedUserAuthentication::SupervisedUserAuthentication(
SupervisedUserManager* owner)
: owner_(owner),
- stable_schema_(SCHEMA_SALT_HASHED) {
+ stable_schema_(SCHEMA_PLAIN) {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kEnableSupervisedPasswordSync)) {
+ stable_schema_ = SCHEMA_SALT_HASHED;
+ }
}
SupervisedUserAuthentication::~SupervisedUserAuthentication() {}
diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc
index 4942c72..5b47f24 100644
--- a/chromeos/chromeos_switches.cc
+++ b/chromeos/chromeos_switches.cc
@@ -204,5 +204,8 @@ const char kForceFirstRunUI[] = "force-first-run-ui";
// Enables testing for auto update UI.
const char kTestAutoUpdateUI[] = "test-auto-update-ui";
+// Enables features required for supervised user sync,
+const char kEnableSupervisedPasswordSync[] = "enable-supervised-password-sync";
+
} // namespace switches
} // namespace chromeos
diff --git a/chromeos/chromeos_switches.h b/chromeos/chromeos_switches.h
index 48aee7a..097f9d6 100644
--- a/chromeos/chromeos_switches.h
+++ b/chromeos/chromeos_switches.h
@@ -73,6 +73,7 @@ CHROMEOS_EXPORT extern const char kEnableFirstRunUITransitions[];
CHROMEOS_EXPORT extern const char kDisableSamlSignin[];
CHROMEOS_EXPORT extern const char kGAIAAuthExtensionManifest[];
CHROMEOS_EXPORT extern const char kTestAutoUpdateUI[];
+CHROMEOS_EXPORT extern const char kEnableSupervisedPasswordSync[];
} // namespace switches
} // namespace chromeos