Skip to content

Commit

Permalink
Revert 261551 "Enable supervised users password sync/import on C..."
Browse files Browse the repository at this point in the history
[ 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
  • Loading branch information
nick@chromium.org committed Apr 4, 2014
1 parent 46ad67f commit 065105c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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() {}
Expand Down
3 changes: 3 additions & 0 deletions chromeos/chromeos_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions chromeos/chromeos_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 065105c

Please sign in to comment.