Index: chrome/browser/chromeos/login/wizard_controller.cc |
=================================================================== |
--- chrome/browser/chromeos/login/wizard_controller.cc (revision 48050) |
+++ chrome/browser/chromeos/login/wizard_controller.cc (working copy) |
@@ -16,6 +16,7 @@ |
#include "base/logging.h" // For NOTREACHED. |
#include "chrome/browser/chromeos/cros/cros_library.h" |
#include "chrome/browser/chromeos/cros/login_library.h" |
+#include "chrome/browser/chromeos/customization_document.h" |
#include "chrome/browser/chromeos/login/account_screen.h" |
#include "chrome/browser/chromeos/login/background_view.h" |
#include "chrome/browser/chromeos/login/existing_user_controller.h" |
@@ -162,6 +163,7 @@ |
/////////////////////////////////////////////////////////////////////////////// |
// WizardController, public: |
+ |
WizardController::WizardController() |
: widget_(NULL), |
background_widget_(NULL), |
@@ -297,6 +299,11 @@ |
} |
} |
+void WizardController::SetCustomization( |
+ const chromeos::StartupCustomizationDocument* customization) { |
+ customization_.reset(customization); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// WizardController, ExitHandlers: |
void WizardController::OnLoginSignInSelected() { |
@@ -473,7 +480,21 @@ |
} |
} |
+ // Load partner customization startup manifest if needed. |
+ scoped_ptr<chromeos::StartupCustomizationDocument> customization; |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kStartupManifest)) { |
+ customization.reset(new chromeos::StartupCustomizationDocument()); |
+ FilePath manifest_path = |
+ CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
+ switches::kStartupManifest); |
+ bool manifest_loaded = customization->LoadManifestFromFile(manifest_path); |
+ DCHECK(manifest_loaded) << manifest_path.value(); |
+ } |
+ |
+ // Create and show the wizard. |
WizardController* controller = new WizardController(); |
+ controller->SetCustomization(customization.release()); |
controller->ShowBackground(screen_bounds); |
controller->Init(first_screen_name, screen_bounds, true); |
controller->Show(); |