OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/installer/mini_installer/configuration.h" | 5 #include "chrome/installer/mini_installer/configuration.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> // NOLINT | 8 #include <shellapi.h> // NOLINT |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 bool Configuration::ParseCommandLine(const wchar_t* command_line) { | 68 bool Configuration::ParseCommandLine(const wchar_t* command_line) { |
69 command_line_ = command_line; | 69 command_line_ = command_line; |
70 args_ = ::CommandLineToArgvW(command_line_, &argument_count_); | 70 args_ = ::CommandLineToArgvW(command_line_, &argument_count_); |
71 if (!args_) | 71 if (!args_) |
72 return false; | 72 return false; |
73 | 73 |
74 for (int i = 1; i < argument_count_; ++i) { | 74 for (int i = 1; i < argument_count_; ++i) { |
75 if (0 == ::lstrcmpi(args_[i], L"--system-level")) | 75 if (0 == ::lstrcmpi(args_[i], L"--system-level")) |
76 is_system_level_ = true; | 76 is_system_level_ = true; |
77 #if defined(GOOGLE_CHROME_BUILD) | 77 #if defined(GOOGLE_CHROME_BUILD) |
78 else if (0 == ::lstrcmpi(args_[i], L"--chrome-beta")) | |
79 chrome_app_guid_ = google_update::kBetaAppGuid; | |
80 else if (0 == ::lstrcmpi(args_[i], L"--chrome-dev")) | |
81 chrome_app_guid_ = google_update::kDevAppGuid; | |
82 else if (0 == ::lstrcmpi(args_[i], L"--chrome-sxs")) | 78 else if (0 == ::lstrcmpi(args_[i], L"--chrome-sxs")) |
83 chrome_app_guid_ = google_update::kSxSAppGuid; | 79 chrome_app_guid_ = google_update::kSxSAppGuid; |
84 #endif | 80 #endif |
85 else if (0 == ::lstrcmpi(args_[i], L"--cleanup")) | 81 else if (0 == ::lstrcmpi(args_[i], L"--cleanup")) |
86 operation_ = CLEANUP; | 82 operation_ = CLEANUP; |
87 else if (0 == ::lstrcmpi(args_[i], L"--chrome-frame")) | 83 else if (0 == ::lstrcmpi(args_[i], L"--chrome-frame")) |
88 has_invalid_switch_ = true; | 84 has_invalid_switch_ = true; |
89 } | 85 } |
90 | 86 |
91 if (!is_system_level_) | 87 if (!is_system_level_) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 ERROR_SUCCESS && | 140 ERROR_SUCCESS && |
145 key.ReadSZValue(kUninstallArgumentsRegistryValue, value.get(), | 141 key.ReadSZValue(kUninstallArgumentsRegistryValue, value.get(), |
146 value.capacity()) == ERROR_SUCCESS && | 142 value.capacity()) == ERROR_SUCCESS && |
147 value.findi(L"--multi-install") != nullptr); | 143 value.findi(L"--multi-install") != nullptr); |
148 #else | 144 #else |
149 return false; | 145 return false; |
150 #endif | 146 #endif |
151 } | 147 } |
152 | 148 |
153 } // namespace mini_installer | 149 } // namespace mini_installer |
OLD | NEW |