diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-26 19:58:33 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-26 19:58:33 +0000 |
commit | e6f2e6a9a9699ac290c86a9dd8992e122ed4abd2 (patch) | |
tree | ce84f8906a194c170436eebc7c40ffc6d027d0df /chrome | |
parent | 5a54d8bb991bb8eb9e31d860d3061d55f48431ac (diff) | |
download | chromium_src-e6f2e6a9a9699ac290c86a9dd8992e122ed4abd2.zip chromium_src-e6f2e6a9a9699ac290c86a9dd8992e122ed4abd2.tar.gz chromium_src-e6f2e6a9a9699ac290c86a9dd8992e122ed4abd2.tar.bz2 |
Revert 53641 - Landing OEM customization CL for Denis
Original CL http://codereview.chromium.org/3026006
Fixed problems with initial locale change freezing Chrome OS on the device.
Added creation of /home/chronos/.oobe_completed flag file.
Removed command line switches for testing customization manifests.
Added StringFetcher class implementation - URL fetcher that downloads content into std::string.
Refactored services customization integration.
Removed sample manifests from Chrome repository. They are submitted into Chromium OS repository at chromeos/src/platform/assets/oem_customization.
BUG=http://crosbug.com/1888
TEST=Manual. Changes to OEM customization manifests on partner partition, namely the initial locale, time zone, and startup page attributes should change OOBE UX accordingly.
Review URL: http://codereview.chromium.org/3064002
TBR=dpolukhin@chromium.org
Review URL: http://codereview.chromium.org/3030020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_init.cc | 13 | ||||
-rw-r--r-- | chrome/browser/browser_init.h | 7 | ||||
-rw-r--r-- | chrome/browser/browser_main.cc | 37 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/existing_user_controller.cc | 2 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/string_fetcher.cc | 51 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/string_fetcher.h | 47 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/wizard_controller.cc | 157 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/wizard_controller.h | 15 | ||||
-rw-r--r-- | chrome/browser/chromeos/testdata/services_manifest.json | 19 | ||||
-rw-r--r-- | chrome/browser/chromeos/testdata/startup_manifest.json | 23 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 8 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 4 |
13 files changed, 148 insertions, 237 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index c645420..1ac7f7b 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -462,6 +462,19 @@ bool BrowserInit::LaunchBrowser( return true; } +#if defined(OS_CHROMEOS) +bool BrowserInit::ApplyServicesCustomization( + const chromeos::ServicesCustomizationDocument* customization) { + GURL welcome_url(customization->initial_start_page_url()); + DCHECK(welcome_url.is_valid()) << welcome_url; + if (welcome_url.is_valid()) { + AddFirstRunTab(welcome_url); + } + // TODO(denisromanov): Add extensions and web apps customization here. + return true; +} +#endif + // LaunchWithProfile ---------------------------------------------------------- BrowserInit::LaunchWithProfile::LaunchWithProfile( diff --git a/chrome/browser/browser_init.h b/chrome/browser/browser_init.h index ec83c70..3aa9b70 100644 --- a/chrome/browser/browser_init.h +++ b/chrome/browser/browser_init.h @@ -76,6 +76,13 @@ class BrowserInit { const std::wstring& cur_dir, bool process_startup, int* return_code); +#if defined(OS_CHROMEOS) + // Processes the OEM services customization document and modifies browser + // settings like initial startup page, web apps and extentions. + bool ApplyServicesCustomization( + const chromeos::ServicesCustomizationDocument* customization); +#endif + // LaunchWithProfile --------------------------------------------------------- // // Assists launching the application and appending the initial tabs for a diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 746df9f..7d645fe 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -108,6 +108,7 @@ #include "app/win_util.h" #include "base/registry.h" #include "base/win_util.h" +#include "chrome/browser/browser.h" #include "chrome/browser/browser_trial.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/net/url_fixer_upper.h" @@ -644,12 +645,42 @@ void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line) { } } +bool OptionallyApplyServicesCustomizationFromCommandLine( + const CommandLine& parsed_command_line, + BrowserInit* browser_init) { + // For Chrome OS, we may need to fetch OEM partner's services customization + // manifest and apply the customizations. This happens on the very first run + // or if startup manifest is passed on the command line. + scoped_ptr<chromeos::ServicesCustomizationDocument> customization; + customization.reset(new chromeos::ServicesCustomizationDocument()); + bool manifest_loaded = false; + if (parsed_command_line.HasSwitch(switches::kServicesManifest)) { + // Load manifest from file specified by command line switch. + FilePath manifest_path = + parsed_command_line.GetSwitchValuePath(switches::kServicesManifest); + manifest_loaded = customization->LoadManifestFromFile(manifest_path); + DCHECK(manifest_loaded) << manifest_path.value(); + } + // If manifest was loaded successfully, apply the customizations. + if (manifest_loaded) { + browser_init->ApplyServicesCustomization(customization.get()); + } + return manifest_loaded; +} + #else void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line) { // Dummy empty function for non-ChromeOS builds to avoid extra ifdefs below. } +bool OptionallyApplyServicesCustomizationFromCommandLine( + const CommandLine& parsed_command_line, + BrowserInit* browser_init) { + // Dummy empty function for non-ChromeOS builds to avoid extra ifdefs below. + return false; +} + #endif // defined(OS_CHROMEOS) #if defined(OS_MACOSX) @@ -1096,6 +1127,12 @@ int BrowserMain(const MainFunctionParams& parameters) { RegisterExtensionProtocols(); RegisterMetadataURLRequestHandler(); + // If path to partner services customization document was passed on command + // line, apply the customizations (Chrome OS only). + // TODO(denisromanov): Remove this when not needed for testing. + OptionallyApplyServicesCustomizationFromCommandLine(parsed_command_line, + &browser_init); + // In unittest mode, this will do nothing. In normal mode, this will create // the global GoogleURLTracker and IntranetRedirectDetector instances, which // will promptly go to sleep for five and seven seconds, respectively (to diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index 2d33535..e8f2a75 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -113,7 +113,7 @@ void ExistingUserController::Init() { background_bounds_, &background_view_); - if (!WizardController::IsOobeCompleted()) { + if (!WizardController::IsOobeComplete()) { background_view_->SetOobeProgressBarVisible(true); background_view_->SetOobeProgress(chromeos::BackgroundView::SIGNIN); } diff --git a/chrome/browser/chromeos/login/string_fetcher.cc b/chrome/browser/chromeos/login/string_fetcher.cc deleted file mode 100644 index 97a84fa..0000000 --- a/chrome/browser/chromeos/login/string_fetcher.cc +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/chromeos/login/string_fetcher.h" - -#include "base/file_path.h" -#include "base/file_util.h" -#include "base/logging.h" -#include "chrome/browser/profile_manager.h" -#include "googleurl/src/gurl.h" - -StringFetcher::StringFetcher(const std::string& url_str) { - GURL url(url_str); - - DCHECK(url.is_valid()); - if (!url.is_valid()) { - response_code_ = 404; - return; - } - - if (url.SchemeIsFile()) { - LOG(INFO) << url.path(); - if (file_util::ReadFileToString(FilePath(url.path()), &result_)) { - response_code_ = 200; - } else { - response_code_ = 404; - } - return; - } - url_fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this)); - url_fetcher_->set_request_context( - ProfileManager::GetDefaultProfile()->GetRequestContext()); - url_fetcher_->Start(); -} - -void StringFetcher::OnURLFetchComplete(const URLFetcher* source, - const GURL& url, - const URLRequestStatus& status, - int response_code, - const ResponseCookies& cookies, - const std::string& data) { - response_code_ = response_code; - if (response_code != 200) { - LOG(ERROR) << "Response code is " << response_code; - LOG(ERROR) << "Url is " << url.spec(); - LOG(ERROR) << "Data is " << data; - return; - } - result_ = data; -} diff --git a/chrome/browser/chromeos/login/string_fetcher.h b/chrome/browser/chromeos/login/string_fetcher.h deleted file mode 100644 index 3635e92..0000000 --- a/chrome/browser/chromeos/login/string_fetcher.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_STRING_FETCHER_H_ -#define CHROME_BROWSER_CHROMEOS_LOGIN_STRING_FETCHER_H_ - -#include <string> - -#include "base/basictypes.h" -#include "base/scoped_ptr.h" -#include "chrome/common/net/url_fetcher.h" - -// This class is used to fetch an URL and store result as a string. -class StringFetcher : public URLFetcher::Delegate { - public: - // Initiates URL fetch. - explicit StringFetcher(const std::string& url); - - const std::string& result() const { return result_; } - int response_code() const { return response_code_; } - bool succeeded() const { return response_code_ == 200; } - - private: - // Overriden from URLFetcher::Delegate: - virtual void OnURLFetchComplete(const URLFetcher* source, - const GURL& url, - const URLRequestStatus& status, - int response_code, - const ResponseCookies& cookies, - const std::string& data); - // Timer notification handler. - void OnTimeoutElapsed(); - - // URLFetcher instance. - scoped_ptr<URLFetcher> url_fetcher_; - - // Fetch result. - std::string result_; - - // Received HTTP response code. - int response_code_; - - DISALLOW_COPY_AND_ASSIGN(StringFetcher); -}; - -#endif // CHROME_BROWSER_CHROMEOS_LOGIN_STRING_FETCHER_H_ diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index d93420d..8e676fe 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc @@ -12,10 +12,8 @@ #include <vector> #include "app/l10n_util.h" -#include "app/resource_bundle.h" #include "base/command_line.h" #include "base/logging.h" -#include "base/file_util.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/cros/login_library.h" @@ -53,19 +51,6 @@ namespace { // A boolean pref of the OOBE complete flag. const wchar_t kOobeComplete[] = L"OobeComplete"; -// Path to OEM partner startup customization manifest. -const char kStartupCustomizationManifestPath[] = - "/mnt/partner_partition/etc/chromeos/startup_manifest.json"; - -// URL where to fetch OEM services customization manifest from. -// TODO(denisromanov): Change this to real URL when it becomes available. -const char kServicesCustomizationManifestUrl[] = - "file:///mnt/partner_partition/etc/chromeos/services_manifest.json"; - -// Path to flag file indicating that OOBE was completed successfully. -const char kOobeCompleteFlagFilePath[] = - "/home/chronos/.oobe_completed"; - // Default size of the OOBE screen. const int kWizardScreenWidth = 700; const int kWizardScreenHeight = 416; @@ -177,11 +162,6 @@ void DeleteWizardControllerAndLaunchBrowser(WizardController* controller) { ProfileManager::GetDefaultProfile())); } -void DeleteWizardControllerAndApplyCustomization(WizardController* controller) { - controller->ApplyPartnerServicesCustomizations(); - delete controller; -} - } // namespace const char WizardController::kNetworkScreenName[] = "network"; @@ -257,7 +237,7 @@ void WizardController::Init(const std::string& first_screen_name, NULL); window->SetContentsView(contents_); - bool oobe_complete = IsOobeCompleted(); + bool oobe_complete = IsOobeComplete(); if (!oobe_complete || first_screen_name == kOutOfBoxScreenName) { is_out_of_box_ = true; @@ -360,18 +340,7 @@ void WizardController::ShowLoginScreen() { controller->Init(); background_widget_ = NULL; background_view_ = NULL; - - FilePath startup_manifest_path(kStartupCustomizationManifestPath); - if (file_util::PathExists(startup_manifest_path)) { - services_manifest_fetcher_.reset(new StringFetcher( - kServicesCustomizationManifestUrl)); - } - ChromeThread::PostTask( - ChromeThread::UI, - FROM_HERE, - NewRunnableFunction(&DeleteWizardControllerAndApplyCustomization, - this)); - + MessageLoop::current()->DeleteSoon(FROM_HERE, this); return; } @@ -481,7 +450,7 @@ void WizardController::OnAccountCreated() { if (!password_.empty()) { login->view()->SetPassword(password_); // TODO(dpolukhin): clear password memory for real. Now it is not - // a problem because we can't extract password from the form. + // a problem becuase we can't extract password from the form. password_.clear(); login->view()->Login(); } @@ -537,7 +506,6 @@ void WizardController::OnUserImageSkipped() { } void WizardController::OnRegistrationSuccess() { - MarkDeviceRegistered(); // TODO(nkostylev): Registration screen should be shown on first sign in. ShowLoginScreen(); } @@ -603,42 +571,6 @@ void WizardController::MarkOobeCompleted() { prefs->SavePersistentPrefs(); } -void WizardController::MarkDeviceRegistered() { - // Create flag file for boot-time init scripts. - FilePath oobe_complete_path(kOobeCompleteFlagFilePath); - FILE* oobe_flag_file = file_util::OpenFile(oobe_complete_path, "w+b"); - DCHECK(oobe_flag_file != NULL) << kOobeCompleteFlagFilePath; - if (oobe_flag_file != NULL) - file_util::CloseFile(oobe_flag_file); -} - -void WizardController::ApplyPartnerServicesCustomizations() { - if (services_manifest_fetcher_.get() == NULL || - services_manifest_fetcher_->result().empty()) { - return; - } - scoped_ptr<chromeos::ServicesCustomizationDocument> customization; - bool manifest_loaded; - customization.reset(new chromeos::ServicesCustomizationDocument()); - manifest_loaded = customization->LoadManifestFromString( - services_manifest_fetcher_->result()); - DCHECK(manifest_loaded) << "Customization manifest fetch error: " - << services_manifest_fetcher_->result(); - if (!manifest_loaded) - return; - LOG(INFO) << "partner services customizations manifest loaded successfully"; - if (!customization->initial_start_page_url().empty()) { - // Append partner's start page url to command line so it gets opened - // on browser startup. - CommandLine::ForCurrentProcess()->AppendLooseValue( - UTF8ToWide(customization->initial_start_page_url())); - LOG(INFO) << "initial_start_page_url: " - << customization->initial_start_page_url(); - } - // TODO(dpolukhin): apply customized apps, exts and support page. - MarkDeviceRegistered(); -} - /////////////////////////////////////////////////////////////////////////////// // WizardController, chromeos::ScreenObserver overrides: void WizardController::OnExit(ExitCodes exit_code) { @@ -707,15 +639,10 @@ chromeos::ScreenObserver* WizardController::GetObserver(WizardScreen* screen) { return observer_ ? observer_ : this; } -bool WizardController::IsOobeCompleted() { +bool WizardController::IsOobeComplete() { return g_browser_process->local_state()->GetBoolean(kOobeComplete); } -bool WizardController::IsDeviceRegistered() { - FilePath oobe_complete_flag_file_path(kOobeCompleteFlagFilePath); - return file_util::PathExists(oobe_complete_flag_file_path); -} - namespace browser { // Declared in browser_dialogs.h so that others don't need to depend on our .h. @@ -741,7 +668,7 @@ void ShowLoginWizard(const std::string& first_screen_name, gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(size)); // Check whether we need to execute OOBE process. - bool oobe_complete = WizardController::IsOobeCompleted(); + bool oobe_complete = WizardController::IsOobeComplete(); if (first_screen_name.empty() && oobe_complete && @@ -755,61 +682,47 @@ void ShowLoginWizard(const std::string& first_screen_name, return; } - // Create and show the wizard. - WizardController* controller = new WizardController(); + scoped_ptr<chromeos::StartupCustomizationDocument> customization; + + if (!oobe_complete) { + // Load partner customization startup manifest if needed. + 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(); + } - // Load partner customization startup manifest if it is available. - FilePath startup_manifest_path(kStartupCustomizationManifestPath); - std::string locale; - if (file_util::PathExists(startup_manifest_path)) { - scoped_ptr<chromeos::StartupCustomizationDocument> customization( - new chromeos::StartupCustomizationDocument()); - bool manifest_loaded = customization->LoadManifestFromFile( - FilePath(kStartupCustomizationManifestPath)); - DCHECK(manifest_loaded) << kStartupCustomizationManifestPath; - if (manifest_loaded) { - LOG(INFO) << "startup manifest loaded successfully"; - // Switch to initial locale if specified by customization - // and has not been set yet. We cannot call - // chromeos::LanguageSwitchMenu::SwitchLanguage here before - // EmitLoginPromptReady. - const std::string current_locale = - g_browser_process->local_state()->GetString( - prefs::kApplicationLocale); - LOG(INFO) << "current locale: " << current_locale; - if (current_locale.empty()) { - locale = customization->initial_locale(); - LOG(INFO) << "initial locale: " << locale; - if (!locale.empty()) { - ResourceBundle::ReloadSharedInstance(UTF8ToWide(locale)); - } + // Do UX customizations if needed. + if (customization != NULL) { + // Switch to initial locale if specified by customization. + const std::string locale = customization->initial_locale(); + if (!locale.empty()) { + chromeos::LanguageSwitchMenu::SwitchLanguage(locale); } - controller->SetCustomization(customization.release()); + // Set initial timezone if specified by customization. + const std::string timezone_name = customization->initial_timezone(); + if (!timezone_name.empty()) { + icu::TimeZone* timezone = icu::TimeZone::createTimeZone( + icu::UnicodeString::fromUTF8(timezone_name)); + chromeos::CrosLibrary::Get()->GetSystemLibrary()->SetTimezone(timezone); + } } } + // Create and show the wizard. + WizardController* controller = new WizardController(); + if (!oobe_complete) + controller->SetCustomization(customization.release()); controller->ShowBackground(screen_bounds); controller->Init(first_screen_name, screen_bounds); controller->Show(); - if (chromeos::CrosLibrary::Get()->EnsureLoaded()) chromeos::CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady(); - - if (controller->GetCustomization() != NULL) { - if (!locale.empty()) - chromeos::LanguageSwitchMenu::SwitchLanguage(locale); - - // Set initial timezone if specified by customization. - const std::string timezone_name = - controller->GetCustomization()->initial_timezone(); - LOG(INFO) << "initial time zone: " << timezone_name; - if (!timezone_name.empty()) { - icu::TimeZone* timezone = icu::TimeZone::createTimeZone( - icu::UnicodeString::fromUTF8(timezone_name)); - chromeos::CrosLibrary::Get()->GetSystemLibrary()->SetTimezone(timezone); - } - } } } // namespace browser diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h index 64c4898..7366fa3 100644 --- a/chrome/browser/chromeos/login/wizard_controller.h +++ b/chrome/browser/chromeos/login/wizard_controller.h @@ -10,7 +10,6 @@ #include "base/gtest_prod_util.h" #include "base/scoped_ptr.h" #include "chrome/browser/chromeos/login/screen_observer.h" -#include "chrome/browser/chromeos/login/string_fetcher.h" #include "chrome/browser/chromeos/login/view_screen.h" #include "chrome/browser/chromeos/login/wizard_screen.h" #include "testing/gtest/include/gtest/gtest_prod.h" @@ -54,10 +53,7 @@ class WizardController : public chromeos::ScreenObserver, } // Returns OOBE completion status. - static bool IsOobeCompleted(); - - // Returns device registration completion status, i.e. second part of OOBE. - static bool IsDeviceRegistered(); + static bool IsOobeComplete(); // Shows the first screen defined by |first_screen_name| or by default // if the parameter is empty. |screen_bounds| are used to calculate position @@ -117,9 +113,6 @@ class WizardController : public chromeos::ScreenObserver, // Registers OOBE preferences. static void RegisterPrefs(PrefService* local_state); - // Applies partner services customizations. - void ApplyPartnerServicesCustomizations(); - static const char kNetworkScreenName[]; static const char kLoginScreenName[]; static const char kAccountScreenName[]; @@ -171,9 +164,6 @@ class WizardController : public chromeos::ScreenObserver, // Marks OOBE process as completed. void MarkOobeCompleted(); - // Marks device registered. i.e. second part of OOBE is completed. - void MarkDeviceRegistered(); - // Widget we're showing in. views::Widget* widget_; @@ -215,9 +205,6 @@ class WizardController : public chromeos::ScreenObserver, // Partner startup customizations. scoped_ptr<const chromeos::StartupCustomizationDocument> customization_; - // Partner services manifest fetcher. - scoped_ptr<StringFetcher> services_manifest_fetcher_; - FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowErrorNetwork); FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowErrorUpdate); FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, diff --git a/chrome/browser/chromeos/testdata/services_manifest.json b/chrome/browser/chromeos/testdata/services_manifest.json new file mode 100644 index 0000000..5efb835 --- /dev/null +++ b/chrome/browser/chromeos/testdata/services_manifest.json @@ -0,0 +1,19 @@ +{ + // Required. + "version": "1.0", + "app_menu" : { + "section_title" : "A partner application menu section title.", + "web_apps" : [ + "http://localhost/a/1", + "http://localhost/a/2", + ], + "support_page": "http://localhost/h", + "extensions": [ + "http://localhost/e/1", + "http://localhost/e/2", + ], + }, + + // Optional. + "initial_start_page": "http://localhost", +} diff --git a/chrome/browser/chromeos/testdata/startup_manifest.json b/chrome/browser/chromeos/testdata/startup_manifest.json new file mode 100644 index 0000000..25521a2 --- /dev/null +++ b/chrome/browser/chromeos/testdata/startup_manifest.json @@ -0,0 +1,23 @@ +{ + // Required. + "version": "1.0", + "product_sku" : "SKU", + + // Optional. + "initial_locale" : "ru", + "initial_timezone" : "Asia/Tokyo", + "background_color" : "#880088", + "registration_url" : "http://www.google.com", + "setup_content" : [ + { + "content_locale" : "en_US", + "help_page" : "setup_content/en_US/help.html", + "eula_page" : "setup_content/en_US/eula.html", + }, + { + "content_locale" : "ru", + "help_page" : "setup_content/ru/help.html", + "eula_page" : "setup_content/ru/eula.html", + }, + ] +} diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 0027891..a4087f6 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -495,8 +495,6 @@ 'browser/chromeos/login/screen_lock_view.cc', 'browser/chromeos/login/screen_lock_view.h', 'browser/chromeos/login/screen_observer.h', - 'browser/chromeos/login/string_fetcher.h', - 'browser/chromeos/login/string_fetcher.cc', 'browser/chromeos/login/update_screen.cc', 'browser/chromeos/login/update_screen.h', 'browser/chromeos/login/update_view.cc', diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 132f460..8022de8 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1032,6 +1032,14 @@ const char kChromeosFrame[] = "chromeos-frame"; // Set logging output to the given file. const char kChromeosLogToFile[] = "logtofile"; +// Specify startup customization manifest. +// TODO(denisromanov): delete this when not needed for testing. +const char kStartupManifest[] = "startup-manifest"; + +// Specify services customization manifest. +// TODO(denisromanov): delete this when not needed for testing. +const char kServicesManifest[] = "services-manifest"; + // Indicates that the browser is in "browse without sign-in" mode. // Should completely disable extensions, sync and bookmarks. const char kBWSI[] = "bwsi"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 752f21f..f05f5d0 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -300,6 +300,10 @@ extern const char kLoginProfile[]; extern const char kLoginUser[]; extern const char kChromeosFrame[]; extern const char kChromeosLogToFile[]; +// TODO(denisromanov): Remove this flag when it is not needed for testing. +extern const char kStartupManifest[]; +// TODO(denisromanov): Remove this flag when it is not needed for testing, too. +extern const char kServicesManifest[]; extern const char kBWSI[]; #endif |