| 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 | 9 |
| 10 #include "chrome/installer/mini_installer/appid.h" | 10 #include "chrome/installer/mini_installer/appid.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 command_line_ = command_line; | 53 command_line_ = command_line; |
| 54 args_ = ::CommandLineToArgvW(command_line_, &argument_count_); | 54 args_ = ::CommandLineToArgvW(command_line_, &argument_count_); |
| 55 if (args_ != NULL) { | 55 if (args_ != NULL) { |
| 56 for (int i = 1; i < argument_count_; ++i) { | 56 for (int i = 1; i < argument_count_; ++i) { |
| 57 if (0 == ::lstrcmpi(args_[i], L"--chrome-sxs")) | 57 if (0 == ::lstrcmpi(args_[i], L"--chrome-sxs")) |
| 58 chrome_app_guid_ = google_update::kSxSAppGuid; | 58 chrome_app_guid_ = google_update::kSxSAppGuid; |
| 59 else if (0 == ::lstrcmpi(args_[i], L"--chrome")) | 59 else if (0 == ::lstrcmpi(args_[i], L"--chrome")) |
| 60 has_chrome_ = true; | 60 has_chrome_ = true; |
| 61 else if (0 == ::lstrcmpi(args_[i], L"--chrome-frame")) | 61 else if (0 == ::lstrcmpi(args_[i], L"--chrome-frame")) |
| 62 has_chrome_frame_ = true; | 62 has_chrome_frame_ = true; |
| 63 else if (0 == ::lstrcmpi(args_[i], L"--app-host")) | 63 else if ((0 == ::lstrcmpi(args_[i], L"--app-host")) || |
| 64 (0 == ::lstrcmpi(args_[i], L"--app-launcher"))) |
| 64 has_app_host_ = true; | 65 has_app_host_ = true; |
| 65 else if (0 == ::lstrcmpi(args_[i], L"--multi-install")) | 66 else if (0 == ::lstrcmpi(args_[i], L"--multi-install")) |
| 66 is_multi_install_ = true; | 67 is_multi_install_ = true; |
| 67 else if (0 == ::lstrcmpi(args_[i], L"--system-level")) | 68 else if (0 == ::lstrcmpi(args_[i], L"--system-level")) |
| 68 is_system_level_ = true; | 69 is_system_level_ = true; |
| 69 else if (0 == ::lstrcmpi(args_[i], L"--cleanup")) | 70 else if (0 == ::lstrcmpi(args_[i], L"--cleanup")) |
| 70 operation_ = CLEANUP; | 71 operation_ = CLEANUP; |
| 71 } | 72 } |
| 72 | 73 |
| 73 // Single-install defaults to Chrome. | 74 // Single-install defaults to Chrome. |
| 74 if (!is_multi_install_) | 75 if (!is_multi_install_) |
| 75 has_chrome_ = !(has_chrome_frame_ || has_app_host_); | 76 has_chrome_ = !(has_chrome_frame_ || has_app_host_); |
| 76 } | 77 } |
| 77 return args_ != NULL; | 78 return args_ != NULL; |
| 78 } | 79 } |
| 79 | 80 |
| 80 } // namespace mini_installer | 81 } // namespace mini_installer |
| OLD | NEW |