summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authornkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 08:21:43 +0000
committernkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 08:21:43 +0000
commite03dc78d55b148fd84c7ae265748e0cc8ac7448e (patch)
tree5c44b3df469a771081ba3d430a9fc496048ddb7c /chrome
parent75eda33a79ab30dc52c975dd3f4950585f5c3012 (diff)
downloadchromium_src-e03dc78d55b148fd84c7ae265748e0cc8ac7448e.zip
chromium_src-e03dc78d55b148fd84c7ae265748e0cc8ac7448e.tar.gz
chromium_src-e03dc78d55b148fd84c7ae265748e0cc8ac7448e.tar.bz2
[cros] Flip enable-new-oobe switch.
BUG=129799 TEST=Manual + autotests Review URL: https://chromiumcodereview.appspot.com/10808061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd8
-rw-r--r--chrome/browser/about_flags.cc8
-rw-r--r--chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc5
-rw-r--r--chrome/browser/chromeos/login/user_manager_impl.cc6
-rw-r--r--chrome/browser/chromeos/login/webui_login_display_host.cc9
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.cc2
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc10
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.h5
-rw-r--r--chrome/browser/chromeos/login/wizard_in_process_browser_test.cc8
-rw-r--r--chrome/browser/chromeos/login/wizard_in_process_browser_test.h3
-rw-r--r--chrome/browser/ui/webui/chromeos/login/oobe_ui.cc4
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h2
13 files changed, 51 insertions, 23 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 455b2e1..cb45b18 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5908,11 +5908,11 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ENABLE_HTML5_CAMERA_DESCRIPTION" desc="Description for the flag to enable new new camera WebUI.">
Enables HTML5 camera support in some WebUI parts.
</message>
- <message name="IDS_FLAGS_ENABLE_NEW_OOBE" desc="Name for the flag to enable new design for OOBE / sign in flows.">
- Enable OOBE/sign in redesign.
+ <message name="IDS_FLAGS_DISABLE_NEW_OOBE" desc="Name for the flag to disable new design for OOBE / sign in flows.">
+ Disable OOBE/sign in redesign.
</message>
- <message name="IDS_FLAGS_ENABLE_NEW_OOBE_DESCRIPTION" desc="Description for the flag to enable new design for OOBE / sign in flows.">
- Enables new design for OOBE / sign in flows.
+ <message name="IDS_FLAGS_DISABLE_NEW_OOBE_DESCRIPTION" desc="Description for the flag to disable new design for OOBE / sign in flows.">
+ Disables new design for OOBE / sign in flows.
</message>
</if>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 094b570..258bad0 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -803,11 +803,11 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(switches::kEnableHtml5Camera),
},
{
- "enable-new-oobe",
- IDS_FLAGS_ENABLE_NEW_OOBE,
- IDS_FLAGS_ENABLE_NEW_OOBE_DESCRIPTION,
+ "disable-new-oobe",
+ IDS_FLAGS_DISABLE_NEW_OOBE,
+ IDS_FLAGS_DISABLE_NEW_OOBE_DESCRIPTION,
kOsCrOS,
- SINGLE_VALUE_TYPE(switches::kEnableNewOobe),
+ SINGLE_VALUE_TYPE(switches::kDisableNewOobe),
},
#endif
{
diff --git a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
index f02fe2b..6f3cbb4 100644
--- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
+++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
@@ -34,8 +34,11 @@ class UserWallpaperDelegate: public ash::UserWallpaperDelegate {
}
virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe))
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableNewOobe) ||
+ WizardController::IsZeroDelayEnabled()) {
return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
+ }
bool is_registered = WizardController::IsDeviceRegistered();
// TODO(nkostylev): Figure out whether this would affect autotests as well.
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index 2e67ddd..9eb7b3c 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -377,8 +377,10 @@ void UserManagerImpl::EphemeralUserLoggedIn(const std::string& email) {
void UserManagerImpl::InitializeWallpaper() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!IsUserLoggedIn()) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe)) {
- if (!WizardController::IsDeviceRegistered()) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableNewOobe)) {
+ if (!WizardController::IsDeviceRegistered() &&
+ !WizardController::IsZeroDelayEnabled()) {
// TODO(nkostylev): Add switch to disable wallpaper transition on OOBE.
// Should be used on test images so that they are not slowed down.
ash::Shell::GetInstance()->desktop_background_controller()->
diff --git a/chrome/browser/chromeos/login/webui_login_display_host.cc b/chrome/browser/chromeos/login/webui_login_display_host.cc
index 8f71668..5726e60 100644
--- a/chrome/browser/chromeos/login/webui_login_display_host.cc
+++ b/chrome/browser/chromeos/login/webui_login_display_host.cc
@@ -58,10 +58,13 @@ WebUILoginDisplayHost::WebUILoginDisplayHost(const gfx::Rect& background_bounds)
bool is_registered = WizardController::IsDeviceRegistered();
// TODO(nkostylev): Add switch to disable wallpaper transition on OOBE.
// Should be used on test images so that they are not slowed down.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe))
+ bool zero_delay_enabled = WizardController::IsZeroDelayEnabled();
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe) &&
+ !zero_delay_enabled) {
waiting_for_wallpaper_load_ = !is_registered;
- else
+ } else {
waiting_for_wallpaper_load_ = false;
+ }
if (waiting_for_wallpaper_load_) {
registrar_.Add(this, chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED,
@@ -184,7 +187,7 @@ void WebUILoginDisplayHost::LoadURL(const GURL& url) {
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
params.bounds = background_bounds();
params.show_state = ui::SHOW_STATE_FULLSCREEN;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe))
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe))
params.transparent = true;
params.parent =
ash::Shell::GetContainer(
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 5a8cecd..b770eff 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -205,7 +205,7 @@ void WebUILoginView::LoadURL(const GURL & url) {
CommandLine* command_line = CommandLine::ForCurrentProcess();
// Only enable transparency on sign in screen, not on lock screen.
if (BaseLoginDisplayHost::default_host() &&
- command_line->HasSwitch(switches::kEnableNewOobe)) {
+ !command_line->HasSwitch(switches::kDisableNewOobe)) {
// TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track
// when RenderView is created.
// Use a background with transparency to trigger transparency in Webkit.
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 25daa0b..70deb03 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -123,6 +123,9 @@ WizardController* WizardController::default_controller_ = NULL;
// static
bool WizardController::skip_user_image_selection_ = false;
+// static
+bool WizardController::zero_delay_enabled_ = false;
+
///////////////////////////////////////////////////////////////////////////////
// WizardController, public:
@@ -789,8 +792,15 @@ bool WizardController::GetUsageStatisticsReporting() const {
return usage_statistics_reporting_;
}
+// static
+bool WizardController::IsZeroDelayEnabled() {
+ return zero_delay_enabled_;
+}
+
+// static
void WizardController::SetZeroDelays() {
kShowDelayMs = 0;
+ zero_delay_enabled_ = true;
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h
index 6407e2f..7aba8b1 100644
--- a/chrome/browser/chromeos/login/wizard_controller.h
+++ b/chrome/browser/chromeos/login/wizard_controller.h
@@ -88,6 +88,9 @@ class WizardController : public ScreenObserver {
// Returns initial locale from local settings.
static std::string GetInitialLocale();
+ // If true zero delays have been enabled (for browser tests).
+ static bool IsZeroDelayEnabled();
+
// Sets initial locale in local settings.
static void SetInitialLocale(const std::string& locale);
@@ -216,6 +219,8 @@ class WizardController : public ScreenObserver {
static bool skip_user_image_selection_;
+ static bool zero_delay_enabled_;
+
// Screens.
scoped_ptr<NetworkScreen> network_screen_;
scoped_ptr<UpdateScreen> update_screen_;
diff --git a/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc b/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc
index 4a4d4b0..fd3aad3 100644
--- a/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc
+++ b/chrome/browser/chromeos/login/wizard_in_process_browser_test.cc
@@ -22,6 +22,11 @@ WizardInProcessBrowserTest::WizardInProcessBrowserTest(const char* screen_name)
host_(NULL) {
}
+void WizardInProcessBrowserTest::SetUp() {
+ WizardController::SetZeroDelays();
+ InProcessBrowserTest::SetUp();
+}
+
void WizardInProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) {
command_line->AppendSwitch(switches::kNoStartupWindow);
command_line->AppendSwitch(switches::kLoginManager);
@@ -29,9 +34,6 @@ void WizardInProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) {
void WizardInProcessBrowserTest::SetUpOnMainThread() {
SetUpWizard();
-
- WizardController::SetZeroDelays();
-
if (!screen_name_.empty()) {
ShowLoginWizard(screen_name_, gfx::Size(1024, 600));
host_ = BaseLoginDisplayHost::default_host();
diff --git a/chrome/browser/chromeos/login/wizard_in_process_browser_test.h b/chrome/browser/chromeos/login/wizard_in_process_browser_test.h
index fb64519..ad49b74 100644
--- a/chrome/browser/chromeos/login/wizard_in_process_browser_test.h
+++ b/chrome/browser/chromeos/login/wizard_in_process_browser_test.h
@@ -26,6 +26,9 @@ class WizardInProcessBrowserTest : public CrosInProcessBrowserTest {
public:
explicit WizardInProcessBrowserTest(const char* screen_name);
+ // Overriden from InProcessBrowserTest:
+ virtual void SetUp() OVERRIDE;
+
protected:
// Can be overriden by derived test fixtures to set up environment after
// browser is created but wizard is not shown yet.
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index 0581e70..9ff1567 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -180,7 +180,7 @@ OobeUI::OobeUI(content::WebUI* web_ui)
new options2::UserImageSource();
ChromeURLDataManager::AddDataSource(profile, user_image_source);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe)) {
// Set up the chrome://wallpaper/ source.
chromeos::options2::WallpaperImageSource* wallpaper_image_source =
new chromeos::options2::WallpaperImageSource();
@@ -238,7 +238,7 @@ void OobeUI::GetLocalizedStrings(base::DictionaryValue* localized_strings) {
handlers_[i]->GetLocalizedStrings(localized_strings);
ChromeURLDataManager::DataSource::SetFontAndTextDirection(localized_strings);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe))
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe))
localized_strings->SetString("oobeType", "new");
else
localized_strings->SetString("oobeType", "old");
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index a981722..cc01859 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1344,8 +1344,8 @@ const char kTabletUi[] = "tablet-ui";
// Disables gdata content provider.
const char kDisableGData[] = "disable-gdata";
-// Enables new OOBE/sign in design.
-extern const char kEnableNewOobe[] = "enable-new-oobe";
+// Disables new OOBE/sign in design.
+extern const char kDisableNewOobe[] = "disable-new-oobe";
// Enables touchpad three-finger-click as middle button.
const char kEnableTouchpadThreeFingerClick[]
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index bbbb7a7..73cb875 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -365,7 +365,7 @@ extern const char kTabletUi[];
#if defined(OS_CHROMEOS)
// Keep switches in alphabetical order.
extern const char kDisableGData[];
-extern const char kEnableNewOobe[];
+extern const char kDisableNewOobe[];
extern const char kEnableTouchpadThreeFingerClick[];
extern const char kSkipOAuthLogin[];
extern const char kEnableDevicePolicy[];