OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ | 5 #ifndef CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ |
6 #define CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ | 6 #define CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "chrome/installer/util/browser_distribution.h" | 15 #include "chrome/installer/util/browser_distribution.h" |
16 | 16 |
17 // This class has methods to install and uninstall Chrome mini installer. | 17 // This class has methods to install and uninstall Chrome mini installer. |
18 class ChromeMiniInstaller { | 18 class ChromeMiniInstaller { |
19 public: | 19 public: |
20 ChromeMiniInstaller(bool system_install, | 20 ChromeMiniInstaller(bool system_install, |
21 bool is_chrome_frame, const std::string& build); | 21 bool is_chrome_frame, const std::string& build); |
22 ~ChromeMiniInstaller() {} | 22 ~ChromeMiniInstaller() {} |
23 | 23 |
24 enum RepairChrome { | 24 enum RepairChrome { |
25 REGISTRY, | 25 REGISTRY, |
26 VERSION_FOLDER | 26 VERSION_FOLDER |
27 }; | 27 }; |
28 | 28 |
29 // This method returns path to either program files | 29 // Get the location at which Chrome or Chrome Frame is installed. |
30 // or documents and setting based on the install type. | 30 bool GetInstallDirectory(FilePath* path); |
31 bool GetChromeInstallDirectoryLocation(FilePath* path); | 31 |
32 // Get the base multi-install command. | 32 // Get the base multi-install command. |
33 CommandLine GetBaseMultiInstallCommand(); | 33 CommandLine GetBaseMultiInstallCommand(); |
34 | 34 |
35 // Installs the latest full installer. | 35 // Installs the latest full installer. |
36 void InstallFullInstaller(bool over_install); | 36 void InstallFullInstaller(bool over_install); |
37 | 37 |
38 void InstallChromeUsingMultiInstall(); | 38 void InstallChromeUsingMultiInstall(); |
39 void InstallChromeFrameUsingMultiInstall(); | 39 void InstallChromeFrameUsingMultiInstall(); |
40 void InstallChromeAndChromeFrame(bool ready_mode); | 40 void InstallChromeAndChromeFrame(bool ready_mode); |
41 | 41 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // This method verifies if Chrome/Chrome Frame installed correctly. | 115 // This method verifies if Chrome/Chrome Frame installed correctly. |
116 void VerifyInstall(bool over_install); | 116 void VerifyInstall(bool over_install); |
117 | 117 |
118 // This method will verify if ChromeFrame got successfully installed on the | 118 // This method will verify if ChromeFrame got successfully installed on the |
119 // machine. | 119 // machine. |
120 void VerifyChromeFrameInstall(); | 120 void VerifyChromeFrameInstall(); |
121 | 121 |
122 // Launch IE with |navigate_url|. | 122 // Launch IE with |navigate_url|. |
123 void LaunchIE(const std::wstring& navigate_url); | 123 void LaunchIE(const std::wstring& navigate_url); |
124 | 124 |
125 // Run installer using provided |command|. | 125 // Run installer with given |command|. If installer is |
| 126 // system level append "--system-level" flag. |
126 void RunInstaller(const CommandLine& command); | 127 void RunInstaller(const CommandLine& command); |
127 | 128 |
128 // Compares the registry key values after overinstall. | 129 // Compares the registry key values after overinstall. |
129 bool VerifyOverInstall(const std::string& reg_key_value_before_overinstall, | 130 bool VerifyOverInstall(const std::string& reg_key_value_before_overinstall, |
130 const std::string& reg_key_value_after_overinstall); | 131 const std::string& reg_key_value_after_overinstall); |
131 | 132 |
132 // This method will verify if the installed build is correct. | 133 // This method will verify if the installed build is correct. |
133 bool VerifyStandaloneInstall(); | 134 bool VerifyStandaloneInstall(); |
134 | 135 |
135 // This method will create a command line to run apply tag. | 136 // This method will create a command line to run apply tag. |
(...skipping 16 matching lines...) Expand all Loading... |
152 | 153 |
153 // Build under test. | 154 // Build under test. |
154 std::string build_; | 155 std::string build_; |
155 // Build numbers. | 156 // Build numbers. |
156 std::string current_build_, current_diff_build_, previous_build_; | 157 std::string current_build_, current_diff_build_, previous_build_; |
157 | 158 |
158 DISALLOW_COPY_AND_ASSIGN(ChromeMiniInstaller); | 159 DISALLOW_COPY_AND_ASSIGN(ChromeMiniInstaller); |
159 }; | 160 }; |
160 | 161 |
161 #endif // CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ | 162 #endif // CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ |
OLD | NEW |