| Index: chrome/installer/mini_installer/configuration.cc
|
| diff --git a/chrome/installer/mini_installer/configuration.cc b/chrome/installer/mini_installer/configuration.cc
|
| index 1dc80d9a56dc496f50f45d49d8d7400fcb2dce27..f6c793dbca3edf35274ca7d2b0fd362b3e0411fd 100644
|
| --- a/chrome/installer/mini_installer/configuration.cc
|
| +++ b/chrome/installer/mini_installer/configuration.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/installer/mini_installer/configuration.h"
|
|
|
| +#include <windows.h>
|
| #include <shellapi.h> // NOLINT
|
| #include <stddef.h>
|
|
|
| @@ -14,6 +15,19 @@
|
|
|
| namespace mini_installer {
|
|
|
| +namespace {
|
| +
|
| +// Returns true if GoogleUpdateIsMachine=1 is present in the environment.
|
| +bool GetGoogleUpdateIsMachineEnvVar() {
|
| + const DWORD kBufferSize = 2;
|
| + StackString<kBufferSize> value;
|
| + DWORD length = ::GetEnvironmentVariableW(L"GoogleUpdateIsMachine",
|
| + value.get(), kBufferSize);
|
| + return length == 1 && *value.get() == L'1';
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| Configuration::Configuration() : args_(NULL) {
|
| Clear();
|
| }
|
| @@ -123,6 +137,8 @@ bool Configuration::ParseCommandLine(const wchar_t* command_line) {
|
| operation_ = CLEANUP;
|
| }
|
|
|
| + if (!is_system_level_)
|
| + is_system_level_ = GetGoogleUpdateIsMachineEnvVar();
|
| SetChromeAppGuid();
|
| if (!is_multi_install_) {
|
| has_chrome_ = !has_chrome_frame_;
|
|
|