Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 2101021: Adding initial implementation of the PartnerCustomization classes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/chromeos/testdata/startup_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698