diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 00:36:46 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 00:36:46 +0000 |
commit | f5eddaf87e378c29412a028e027f91d48fbab551 (patch) | |
tree | 071dbbc2730f28bfa414437c3eda73421754bf37 /chrome | |
parent | 84dee7fa8a7098e54f1dd12a028bc1ea9a76c99b (diff) | |
download | chromium_src-f5eddaf87e378c29412a028e027f91d48fbab551.zip chromium_src-f5eddaf87e378c29412a028e027f91d48fbab551.tar.gz chromium_src-f5eddaf87e378c29412a028e027f91d48fbab551.tar.bz2 |
* Add support for verbose-logging option in master preferences file.
BUG=1497924
Review URL: http://codereview.chromium.org/11369
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-x | chrome/installer/setup/main.cc | 7 | ||||
-rw-r--r-- | chrome/installer/util/master_preferences.cc | 5 | ||||
-rw-r--r-- | chrome/installer/util/master_preferences.h | 7 | ||||
-rwxr-xr-x | chrome/installer/util/util_constants.h | 2 |
4 files changed, 19 insertions, 2 deletions
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc index 2332c8a..f89bb29 100755 --- a/chrome/installer/setup/main.cc +++ b/chrome/installer/setup/main.cc @@ -243,6 +243,10 @@ int GetInstallOptions(const CommandLine& cmd_line) { cmd_line.HasSwitch(installer_util::switches::kSystemLevel)) options |= installer_util::SYSTEM_LEVEL; + if (preferences & installer_util::MASTER_PROFILE_VERBOSE_LOGGING || + cmd_line.HasSwitch(installer_util::switches::kVerboseLogging)) + options |= installer_util::VERBOSE_LOGGING; + return options; } @@ -436,6 +440,9 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, CommandLine parsed_command_line; installer::InitInstallerLogging(parsed_command_line); int options = GetInstallOptions(parsed_command_line); + if (options & installer_util::VERBOSE_LOGGING) + logging::SetMinLogLevel(logging::LOG_INFO); + bool system_install = (options & installer_util::SYSTEM_LEVEL) != 0; LOG(INFO) << "system install is " << system_install; diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc index 6d85d10..ee09b48 100644 --- a/chrome/installer/util/master_preferences.cc +++ b/chrome/installer/util/master_preferences.cc @@ -51,6 +51,8 @@ const wchar_t kDoNotLaunchChrome[] = L"distribution.do_not_launch_chrome"; const wchar_t kMakeChromeDefault[] = L"distribution.make_chrome_default"; // Install Chrome to system wise location. const wchar_t kSystemLevel[] = L"distribution.system_level"; +// Run installer in verbose mode. +const wchar_t kVerboseLogging[] = L"distribution.verbose_logging"; int ParseDistributionPreferences(const std::wstring& master_prefs_path) { @@ -94,6 +96,9 @@ int ParseDistributionPreferences(const std::wstring& master_prefs_path) { if (GetBooleanPref(json_root.get(), kSystemLevel)) parse_result |= MASTER_PROFILE_SYSTEM_LEVEL; + if (GetBooleanPref(json_root.get(), kVerboseLogging)) + parse_result |= MASTER_PROFILE_VERBOSE_LOGGING; + return parse_result; } diff --git a/chrome/installer/util/master_preferences.h b/chrome/installer/util/master_preferences.h index c696f7b..e53ba87 100644 --- a/chrome/installer/util/master_preferences.h +++ b/chrome/installer/util/master_preferences.h @@ -41,6 +41,8 @@ enum MasterPrefResult { MASTER_PROFILE_MAKE_CHROME_DEFAULT = 0x1 << 8, // Install Chrome to system wise location. MASTER_PROFILE_SYSTEM_LEVEL = 0x1 << 9, + // Run installer in verbose mode. + MASTER_PROFILE_VERBOSE_LOGGING = 0x1 << 10, }; @@ -58,8 +60,9 @@ enum MasterPrefResult { // "import_history": false // "create_all_shortcuts": true, // "do_not_launch_chrome": false, -// "make_chrome_default", false, -// "system_level", false, +// "make_chrome_default": false, +// "system_level": false, +// "verbose_logging": true // }, // "browser": { // "show_home_button": true diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h index 662029f..ec1f267 100755 --- a/chrome/installer/util/util_constants.h +++ b/chrome/installer/util/util_constants.h @@ -52,6 +52,8 @@ enum InstallOption { MAKE_CHROME_DEFAULT = 0x1 << 4, // Install Chrome to system wise location. SYSTEM_LEVEL = 0x1 << 5, + // Run installer in verbose mode. + VERBOSE_LOGGING = 0x1 << 6, }; namespace switches { |