summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-18 21:39:43 +0000
committerrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-18 21:39:43 +0000
commit8bcdcbe8e59f804e03f75e86744211210c64484a (patch)
tree06a04450b42770a59ecab09998608c005fed391d /chrome/test
parentaf784739ebdc4ca47d9d52e366587e4c7ba2313b (diff)
downloadchromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.zip
chromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.tar.gz
chromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.tar.bz2
First set of changes to start separating Google specific branding from Chromium. This change mostly tries to modify installer to install Chromium or Google Chrome depending on a compile flag. The goal is to try to isolate all the differences in a single class that can be overridden for customization. There is also a lot of refactoring to make this happen.
Some changes are yet to be done but I didn't want to make this change even bigger than it already is. With all these changes the default build should still work as it is (Google Chrome should get installed/uninstalled). The changes yet to be done: - Separating string resources (this is marked by TODO in one of the files) - Generate different chrome.7z (Chromium will not include rlz.dll) for mini_installer BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/mini_installer_test/chrome_mini_installer.cc15
-rw-r--r--chrome/test/mini_installer_test/mini_installer_test.vcproj4
2 files changed, 12 insertions, 7 deletions
diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.cc b/chrome/test/mini_installer_test/chrome_mini_installer.cc
index c8d67c3..2376271 100644
--- a/chrome/test/mini_installer_test/chrome_mini_installer.cc
+++ b/chrome/test/mini_installer_test/chrome_mini_installer.cc
@@ -34,6 +34,7 @@
#include "base/registry.h"
#include "base/string_util.h"
#include "chrome/installer/setup/setup_constants.h"
+#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/util_constants.h"
@@ -48,7 +49,8 @@ void ChromeMiniInstaller::InstallMiniInstaller(bool over_install) {
}
LaunchExe(mini_installer_constants::kChromeMiniInstallerExecutable,
mini_installer_constants::kChromeMiniInstallerExecutable);
- ASSERT_TRUE(CheckRegistryKey(InstallUtil::GetChromeGoogleUpdateKey()));
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ ASSERT_TRUE(CheckRegistryKey(dist->GetVersionKey()));
FindChromeShortcut();
WaitUntilProcessStartsRunning(installer_util::kChromeExe);
if (!over_install) {
@@ -77,7 +79,8 @@ void ChromeMiniInstaller::InstallChromeSetupDev() {
chrome_google_update_state_key.append(L"\\");
chrome_google_update_state_key.append(google_update::kChromeGuid);
ASSERT_TRUE(CheckRegistryKey(chrome_google_update_state_key));
- ASSERT_TRUE(CheckRegistryKey(InstallUtil::GetChromeGoogleUpdateKey()));
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ ASSERT_TRUE(CheckRegistryKey(dist->GetVersionKey()));
FindChromeShortcut();
WaitUntilProcessStartsRunning(installer_util::kChromeExe);
ASSERT_TRUE(CloseWindow(mini_installer_constants::kFirstChromeUI, WM_CLOSE));
@@ -110,7 +113,8 @@ void ChromeMiniInstaller::OverInstall() {
// Deletes App dir.
void ChromeMiniInstaller::UnInstall() {
printf("Verifying if Chrome is installed...\n");
- if (!CheckRegistryKey(InstallUtil::GetChromeGoogleUpdateKey())) {
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ if (!CheckRegistryKey(dist->GetVersionKey())) {
printf("Chrome is not installed.\n");
return;
}
@@ -129,7 +133,7 @@ void ChromeMiniInstaller::UnInstall() {
mini_installer_constants::kConfirmDialog, WM_COMMAND));
WaitUntilProcessStopsRunning(
mini_installer_constants::kChromeSetupExecutable);
- ASSERT_FALSE(CheckRegistryKey(InstallUtil::GetChromeGoogleUpdateKey()));
+ ASSERT_FALSE(CheckRegistryKey(dist->GetVersionKey()));
DeleteAppFolder();
FindChromeShortcut();
if (false == CloseWindow(mini_installer_constants::kChromeUninstallIETitle,
@@ -235,7 +239,8 @@ std::wstring ChromeMiniInstaller::GetUninstallPath() {
// Reads Chrome registry key.
std::wstring ChromeMiniInstaller::GetRegistryKey() {
std::wstring build_key_value;
- RegKey key(HKEY_CURRENT_USER, InstallUtil::GetChromeGoogleUpdateKey().c_str());
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ RegKey key(HKEY_CURRENT_USER, dist->GetVersionKey().c_str());
if (!key.ReadValue(L"pv", &build_key_value))
return false;
return build_key_value;
diff --git a/chrome/test/mini_installer_test/mini_installer_test.vcproj b/chrome/test/mini_installer_test/mini_installer_test.vcproj
index 2a20087..e993140 100644
--- a/chrome/test/mini_installer_test/mini_installer_test.vcproj
+++ b/chrome/test/mini_installer_test/mini_installer_test.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;$(SolutionDir)\tools\build\win\unit_test.vsprops;$(SolutionDir)\installer\util\using_util.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;$(SolutionDir)\tools\build\win\unit_test.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@@ -80,7 +80,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops;$(SolutionDir)\tools\build\win\unit_test.vsprops;$(SolutionDir)\installer\util\using_util.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops;$(SolutionDir)\tools\build\win\unit_test.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
>
<Tool
Name="VCPreBuildEventTool"