| 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 #ifndef CHROME_INSTALLER_MINI_INSTALLER_CONFIGURATION_H_ | 5 #ifndef CHROME_INSTALLER_MINI_INSTALLER_CONFIGURATION_H_ |
| 6 #define CHROME_INSTALLER_MINI_INSTALLER_CONFIGURATION_H_ | 6 #define CHROME_INSTALLER_MINI_INSTALLER_CONFIGURATION_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 namespace mini_installer { | 10 namespace mini_installer { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 const wchar_t* command_line() const { return command_line_; } | 39 const wchar_t* command_line() const { return command_line_; } |
| 40 | 40 |
| 41 // Returns the app guid to be used for Chrome. --chrome-sxs on the command | 41 // Returns the app guid to be used for Chrome. --chrome-sxs on the command |
| 42 // line makes this the canary's app guid (Google Chrome only). | 42 // line makes this the canary's app guid (Google Chrome only). |
| 43 const wchar_t* chrome_app_guid() const { return chrome_app_guid_; } | 43 const wchar_t* chrome_app_guid() const { return chrome_app_guid_; } |
| 44 | 44 |
| 45 // Returns true if --system-level is on the command line or if | 45 // Returns true if --system-level is on the command line or if |
| 46 // GoogleUpdateIsMachine=1 is set in the process's environment. | 46 // GoogleUpdateIsMachine=1 is set in the process's environment. |
| 47 bool is_system_level() const { return is_system_level_; } | 47 bool is_system_level() const { return is_system_level_; } |
| 48 | 48 |
| 49 // Retuns true if --chrome-sxs is on the command line (Google Chrome only). | |
| 50 bool is_side_by_side() const { return is_side_by_side_; } | |
| 51 | |
| 52 // Returns true if an existing multi-install Chrome is being updated (Google | 49 // Returns true if an existing multi-install Chrome is being updated (Google |
| 53 // Chrome only). | 50 // Chrome only). |
| 54 bool is_updating_multi_chrome() const { return is_updating_multi_chrome_; } | 51 bool is_updating_multi_chrome() const { return is_updating_multi_chrome_; } |
| 55 | 52 |
| 56 // Returns true if any invalid switch is found on the command line. | 53 // Returns true if any invalid switch is found on the command line. |
| 57 bool has_invalid_switch() const { return has_invalid_switch_; } | 54 bool has_invalid_switch() const { return has_invalid_switch_; } |
| 58 | 55 |
| 59 // Returns the previous version contained in the image's resource. | 56 // Returns the previous version contained in the image's resource. |
| 60 const wchar_t* previous_version() const { return previous_version_; } | 57 const wchar_t* previous_version() const { return previous_version_; } |
| 61 | 58 |
| 62 protected: | 59 protected: |
| 63 void Clear(); | 60 void Clear(); |
| 64 bool ParseCommandLine(const wchar_t* command_line); | 61 bool ParseCommandLine(const wchar_t* command_line); |
| 65 void ReadResources(HMODULE module); | 62 void ReadResources(HMODULE module); |
| 66 | 63 |
| 67 wchar_t** args_; | 64 wchar_t** args_; |
| 68 const wchar_t* chrome_app_guid_; | 65 const wchar_t* chrome_app_guid_; |
| 69 const wchar_t* command_line_; | 66 const wchar_t* command_line_; |
| 70 int argument_count_; | 67 int argument_count_; |
| 71 Operation operation_; | 68 Operation operation_; |
| 72 bool is_system_level_; | 69 bool is_system_level_; |
| 73 bool is_side_by_side_; | |
| 74 bool is_updating_multi_chrome_; | 70 bool is_updating_multi_chrome_; |
| 75 bool has_invalid_switch_; | 71 bool has_invalid_switch_; |
| 76 const wchar_t* previous_version_; | 72 const wchar_t* previous_version_; |
| 77 | 73 |
| 78 private: | 74 private: |
| 79 Configuration(const Configuration&) = delete; | 75 Configuration(const Configuration&) = delete; |
| 80 Configuration& operator=(const Configuration&) = delete; | 76 Configuration& operator=(const Configuration&) = delete; |
| 81 | 77 |
| 82 // Returns true if multi-install Chrome is already present on the machine. | 78 // Returns true if multi-install Chrome is already present on the machine. |
| 83 bool IsUpdatingMultiChrome() const; | 79 bool IsUpdatingMultiChrome() const; |
| 84 }; | 80 }; |
| 85 | 81 |
| 86 } // namespace mini_installer | 82 } // namespace mini_installer |
| 87 | 83 |
| 88 #endif // CHROME_INSTALLER_MINI_INSTALLER_CONFIGURATION_H_ | 84 #endif // CHROME_INSTALLER_MINI_INSTALLER_CONFIGURATION_H_ |
| OLD | NEW |