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

Unified Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 2855883005: cros: Selectively fork login assets. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chrome/browser/resources/chromeos/login/md_screen_container.html ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index c7941c628158b9a0336d4ff09bfcc470ab02b283..325a77fc67cefa01b0b06224edf289c105d93dd6 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -124,6 +124,8 @@ const char kProductLogoPath[] = "product-logo.png";
content::WebUIDataSource* CreateOobeUIDataSource(
const base::DictionaryValue& localized_strings,
const std::string& display_type) {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+
content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIOobeHost);
source->AddLocalizedStrings(localized_strings);
@@ -148,8 +150,13 @@ content::WebUIDataSource* CreateOobeUIDataSource(
source->AddResourcePath(kCustomElementsUserPodHTMLPath,
IDR_CUSTOM_ELEMENTS_USER_POD_HTML);
} else {
- source->SetDefaultResource(IDR_LOGIN_HTML);
- source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS);
+ if (command_line->HasSwitch(chromeos::switches::kShowMdLogin)) {
+ source->SetDefaultResource(IDR_MD_LOGIN_HTML);
+ source->AddResourcePath(kLoginJSPath, IDR_MD_LOGIN_JS);
+ } else {
+ source->SetDefaultResource(IDR_LOGIN_HTML);
+ source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS);
+ }
source->AddResourcePath(kCustomElementsHTMLPath,
IDR_CUSTOM_ELEMENTS_LOGIN_HTML);
source->AddResourcePath(kCustomElementsJSPath,
@@ -181,7 +188,6 @@ content::WebUIDataSource* CreateOobeUIDataSource(
source->AddResourcePath(kEnrollmentJSPath, IDR_OOBE_ENROLLMENT_JS);
// Only add a filter when runing as test.
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
const bool is_running_test = command_line->HasSwitch(::switches::kTestName) ||
command_line->HasSwitch(::switches::kTestType);
if (is_running_test)
« no previous file with comments | « chrome/browser/resources/chromeos/login/md_screen_container.html ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698