Skip to content

Commit

Permalink
Revert 69165 - Merge the installer, installer_util and setup_util nam…
Browse files Browse the repository at this point in the history
…espaces into a single installer namespace.

BUG=61609
TEST=NONE

Review URL: http://codereview.chromium.org/5729004

TBR=robertshield@chromium.org
Review URL: http://codereview.chromium.org/5756007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69167 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
robertshield@chromium.org committed Dec 14, 2010
1 parent befe84b commit 5ddd1ea
Show file tree
Hide file tree
Showing 58 changed files with 550 additions and 550 deletions.
8 changes: 4 additions & 4 deletions ceee/common/install_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "base/path_service.h"
#include "chrome/installer/util/util_constants.h"

namespace installer {
namespace installer_util {
namespace switches {
// TODO(joi@chromium.org) Move to chrome/installer/util_constants.h
// when we refactor this logic to be in the installer rather than
Expand Down Expand Up @@ -43,10 +43,10 @@ bool ShouldRegisterImpl(bool check_firefox) {
// also be provided.
CommandLine current_command_line(CommandLine::NO_PROGRAM);
current_command_line.ParseFromString(::GetCommandLine());
if (current_command_line.HasSwitch(installer::switches::kEnableCeee) &&
current_command_line.HasSwitch(installer::switches::kChromeFrame) &&
if (current_command_line.HasSwitch(installer_util::switches::kEnableCeee) &&
current_command_line.HasSwitch(installer_util::switches::kChromeFrame) &&
(!check_firefox || current_command_line.HasSwitch(
installer::switches::kEnableFfCeee))) {
installer_util::switches::kEnableFfCeee))) {
return true;
} else {
return false;
Expand Down
2 changes: 1 addition & 1 deletion ceee/installer_dll/installer_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ HRESULT SetCeeeChannelModifier(bool new_value) {
}

// We create the "ap" value if it doesn't exist.
installer::ChannelInfo channel_info;
installer_util::ChannelInfo channel_info;
channel_info.Initialize(key);

if (channel_info.SetCeee(new_value) && !channel_info.Write(&key)) {
Expand Down
6 changes: 3 additions & 3 deletions chrome/app/client_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool GetVersion(const wchar_t* exe_path, const wchar_t* key_path,
// TODO(cpu) : This is solving the same problem as the environment variable
// so one of them will eventually be deprecated.
std::wstring new_chrome_exe(exe_path);
new_chrome_exe.append(installer::kChromeNewExe);
new_chrome_exe.append(installer_util::kChromeNewExe);
if (::PathFileExistsW(new_chrome_exe.c_str()) &&
ReadRegistryStr(key, google_update::kRegOldVersionField, version)) {
::RegCloseKey(key);
Expand Down Expand Up @@ -103,14 +103,14 @@ HMODULE LoadChromeWithDirectory(std::wstring* dir) {
(cmd_line.GetSwitchValueASCII(switches::kProcessType) ==
switches::kNaClLoaderProcess)) {
// Load the 64-bit DLL when running in a 64-bit process.
dir->append(installer::kChromeNaCl64Dll);
dir->append(installer_util::kChromeNaCl64Dll);
} else {
// Only NaCl broker and loader can be launched as Win64 processes.
NOTREACHED();
return NULL;
}
#else
dir->append(installer::kChromeDll);
dir->append(installer_util::kChromeDll);
#endif

#ifdef NDEBUG
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/browser_main_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ bool CheckMachineLevelInstall() {
FilePath uninstall_path(InstallUtil::GetChromeUninstallCmd(false, dist));
CommandLine uninstall_cmd(uninstall_path);
if (!uninstall_cmd.GetProgram().value().empty()) {
uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall);
uninstall_cmd.AppendSwitch(installer_util::switches::kForceUninstall);
uninstall_cmd.AppendSwitch(
installer::switches::kDoNotRemoveSharedItems);
installer_util::switches::kDoNotRemoveSharedItems);
base::LaunchApp(uninstall_cmd, false, false, NULL);
}
return true;
Expand Down
40 changes: 20 additions & 20 deletions chrome/browser/first_run/first_run.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
FilePath master_prefs;
if (!PathService::Get(base::DIR_EXE, &master_prefs))
return true;
master_prefs = master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
master_prefs = master_prefs.AppendASCII(installer_util::kDefaultMasterPrefs);

installer::MasterPreferences prefs(master_prefs);
installer_util::MasterPreferences prefs(master_prefs);
if (!prefs.read_from_file())
return true;

Expand All @@ -107,14 +107,14 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
#if defined(OS_WIN)
// RLZ is currently a Windows-only phenomenon. When it comes to the Mac/
// Linux, enable it here.
if (!prefs.GetInt(installer::master_preferences::kDistroPingDelay,
if (!prefs.GetInt(installer_util::master_preferences::kDistroPingDelay,
&out_prefs->ping_delay)) {
// 90 seconds is the default that we want to use in case master
// preferences is missing, corrupt or ping_delay is missing.
out_prefs->ping_delay = 90;
}

if (prefs.GetBool(installer::master_preferences::kRequireEula, &value) &&
if (prefs.GetBool(installer_util::master_preferences::kRequireEula, &value) &&
value) {
// Show the post-installation EULA. This is done by setup.exe and the
// result determines if we continue or not. We wait here until the user
Expand All @@ -125,24 +125,24 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
FilePath inner_html;
if (WriteEULAtoTempFile(&inner_html)) {
int retcode = 0;
if (!LaunchSetupWithParam(installer::switches::kShowEula,
if (!LaunchSetupWithParam(installer_util::switches::kShowEula,
inner_html.ToWStringHack(), &retcode) ||
(retcode == installer::EULA_REJECTED)) {
(retcode == installer_util::EULA_REJECTED)) {
LOG(WARNING) << "EULA rejected. Fast exit.";
::ExitProcess(1);
}
if (retcode == installer::EULA_ACCEPTED) {
if (retcode == installer_util::EULA_ACCEPTED) {
VLOG(1) << "EULA : no collection";
GoogleUpdateSettings::SetCollectStatsConsent(false);
} else if (retcode == installer::EULA_ACCEPTED_OPT_IN) {
} else if (retcode == installer_util::EULA_ACCEPTED_OPT_IN) {
VLOG(1) << "EULA : collection consent";
GoogleUpdateSettings::SetCollectStatsConsent(true);
}
}
}
#endif

if (prefs.GetBool(installer::master_preferences::kAltFirstRunBubble,
if (prefs.GetBool(installer_util::master_preferences::kAltFirstRunBubble,
&value) && value) {
FirstRun::SetOEMFirstRunBubblePref();
}
Expand All @@ -164,7 +164,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
}
#endif

if (prefs.GetBool(installer::master_preferences::kDistroImportSearchPref,
if (prefs.GetBool(installer_util::master_preferences::kDistroImportSearchPref,
&value)) {
if (value) {
out_prefs->do_import_items |= importer::SEARCH_ENGINES;
Expand All @@ -175,7 +175,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,

// Check to see if search engine logos should be randomized.
if (prefs.GetBool(
installer::master_preferences::
installer_util::master_preferences::
kSearchEngineExperimentRandomizePref,
&value) && value) {
out_prefs->randomize_search_engine_experiment = true;
Expand All @@ -186,12 +186,12 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
// user is guaranteed to see the bubble iff he or she has completed the first
// run process.
if (prefs.GetBool(
installer::master_preferences::kDistroSuppressFirstRunBubble,
installer_util::master_preferences::kDistroSuppressFirstRunBubble,
&value) && value)
FirstRun::SetShowFirstRunBubblePref(false);

if (prefs.GetBool(
installer::master_preferences::kDistroImportHistoryPref,
installer_util::master_preferences::kDistroImportHistoryPref,
&value)) {
if (value) {
out_prefs->do_import_items |= importer::HISTORY;
Expand All @@ -204,7 +204,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
out_prefs->homepage_defined = prefs.GetString(prefs::kHomePage, &not_used);

if (prefs.GetBool(
installer::master_preferences::kDistroImportHomePagePref,
installer_util::master_preferences::kDistroImportHomePagePref,
&value)) {
if (value) {
out_prefs->do_import_items |= importer::HOME_PAGE;
Expand All @@ -215,13 +215,13 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,

// Bookmarks are never imported unless specifically turned on.
if (prefs.GetBool(
installer::master_preferences::kDistroImportBookmarksPref,
installer_util::master_preferences::kDistroImportBookmarksPref,
&value) && value) {
out_prefs->do_import_items |= importer::FAVORITES;
}

if (prefs.GetBool(
installer::master_preferences::kMakeChromeDefaultForUser,
installer_util::master_preferences::kMakeChromeDefaultForUser,
&value) && value) {
out_prefs->make_chrome_default = true;
}
Expand All @@ -231,7 +231,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
// Note we are skipping all other master preferences if skip-first-run-ui
// is *not* specified. (That is, we continue only if skipping first run ui.)
if (!prefs.GetBool(
installer::master_preferences::kDistroSkipFirstRunPref,
installer_util::master_preferences::kDistroSkipFirstRunPref,
&value) || !value) {
return true;
}
Expand All @@ -248,14 +248,14 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
if (!FirstRun::CreateSentinel())
return false;

if (prefs.GetBool(installer::master_preferences::kDistroShowWelcomePage,
if (prefs.GetBool(installer_util::master_preferences::kDistroShowWelcomePage,
&value) && value) {
FirstRun::SetShowWelcomePagePref();
}

std::string import_bookmarks_path;
prefs.GetString(
installer::master_preferences::kDistroImportBookmarksFromFilePref,
installer_util::master_preferences::kDistroImportBookmarksFromFilePref,
&import_bookmarks_path);

#if defined(OS_WIN)
Expand Down Expand Up @@ -302,7 +302,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
#endif

if (prefs.GetBool(
installer::master_preferences::kMakeChromeDefaultForUser,
installer_util::master_preferences::kMakeChromeDefaultForUser,
&value) && value) {
ShellIntegration::SetAsDefaultBrowser();
}
Expand Down
14 changes: 7 additions & 7 deletions chrome/browser/first_run/first_run_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace {
bool GetNewerChromeFile(FilePath* path) {
if (!PathService::Get(base::DIR_EXE, path))
return false;
*path = path->Append(installer::kChromeNewExe);
*path = path->Append(installer_util::kChromeNewExe);
return true;
}

Expand All @@ -83,7 +83,7 @@ bool InvokeGoogleUpdateForRename() {
DWORD exit_code;
::GetExitCodeProcess(handle, &exit_code);
::CloseHandle(handle);
if (exit_code == installer::RENAME_SUCCESSFUL)
if (exit_code == installer_util::RENAME_SUCCESSFUL)
return true;
}
}
Expand All @@ -95,8 +95,8 @@ bool LaunchSetupWithParam(const std::string& param, const std::wstring& value,
FilePath exe_path;
if (!PathService::Get(base::DIR_MODULE, &exe_path))
return false;
exe_path = exe_path.Append(installer::kInstallerDir);
exe_path = exe_path.Append(installer::kSetupExe);
exe_path = exe_path.Append(installer_util::kInstallerDir);
exe_path = exe_path.Append(installer_util::kSetupExe);
base::ProcessHandle ph;
CommandLine cl(exe_path);
cl.AppendSwitchNative(param, value);
Expand Down Expand Up @@ -180,8 +180,8 @@ bool FirstRun::LaunchSetupWithParam(const std::string& param,
FilePath exe_path;
if (!PathService::Get(base::DIR_MODULE, &exe_path))
return false;
exe_path = exe_path.Append(installer::kInstallerDir);
exe_path = exe_path.Append(installer::kSetupExe);
exe_path = exe_path.Append(installer_util::kInstallerDir);
exe_path = exe_path.Append(installer_util::kSetupExe);
base::ProcessHandle ph;
CommandLine cl(exe_path);
cl.AppendSwitchNative(param, value);
Expand Down Expand Up @@ -286,7 +286,7 @@ bool Upgrade::SwapNewChromeExeIfPresent() {
DWORD exit_code;
::GetExitCodeProcess(handle, &exit_code);
::CloseHandle(handle);
if (exit_code == installer::RENAME_SUCCESSFUL)
if (exit_code == installer_util::RENAME_SUCCESSFUL)
return true;
}
}
Expand Down
Loading

0 comments on commit 5ddd1ea

Please sign in to comment.