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; |
78 else if (0 == ::lstrcmpi(args_[i], L"--chrome-sxs")) | 82 else if (0 == ::lstrcmpi(args_[i], L"--chrome-sxs")) |
79 chrome_app_guid_ = google_update::kSxSAppGuid; | 83 chrome_app_guid_ = google_update::kSxSAppGuid; |
80 #endif | 84 #endif |
81 else if (0 == ::lstrcmpi(args_[i], L"--cleanup")) | 85 else if (0 == ::lstrcmpi(args_[i], L"--cleanup")) |
82 operation_ = CLEANUP; | 86 operation_ = CLEANUP; |
83 else if (0 == ::lstrcmpi(args_[i], L"--chrome-frame")) | 87 else if (0 == ::lstrcmpi(args_[i], L"--chrome-frame")) |
84 has_invalid_switch_ = true; | 88 has_invalid_switch_ = true; |
85 } | 89 } |
86 | 90 |
87 if (!is_system_level_) | 91 if (!is_system_level_) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 ERROR_SUCCESS && | 144 ERROR_SUCCESS && |
141 key.ReadSZValue(kUninstallArgumentsRegistryValue, value.get(), | 145 key.ReadSZValue(kUninstallArgumentsRegistryValue, value.get(), |
142 value.capacity()) == ERROR_SUCCESS && | 146 value.capacity()) == ERROR_SUCCESS && |
143 value.findi(L"--multi-install") != nullptr); | 147 value.findi(L"--multi-install") != nullptr); |
144 #else | 148 #else |
145 return false; | 149 return false; |
146 #endif | 150 #endif |
147 } | 151 } |
148 | 152 |
149 } // namespace mini_installer | 153 } // namespace mini_installer |
OLD | NEW |