summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 23:25:08 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 23:25:08 +0000
commit1d1a51bb6862ae5d0fe4147c5f5a78ff450607a2 (patch)
tree37d05eef3e28c5d6b09097e95580fa627d611e7e
parent162dc56ca7a6e9092c4dbc2f1da5a2be2ce4a26c (diff)
downloadchromium_src-1d1a51bb6862ae5d0fe4147c5f5a78ff450607a2.zip
chromium_src-1d1a51bb6862ae5d0fe4147c5f5a78ff450607a2.tar.gz
chromium_src-1d1a51bb6862ae5d0fe4147c5f5a78ff450607a2.tar.bz2
This CL fixes bugs with EULA
- The first run import will trigger the eula again : this requires changes in browser_main.cc so the master prefs are not processed again by the importer process - The launch of setup.exe to show the eula was using a path that only works on developer builds this requires relocating a constant from setup_constants to util_constants BUG=1468838 Review URL: http://codereview.chromium.org/19680 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8928 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_main.cc9
-rwxr-xr-xchrome/browser/first_run.cc9
-rwxr-xr-xchrome/installer/setup/main.cc2
-rwxr-xr-xchrome/installer/setup/setup.cc2
-rw-r--r--chrome/installer/setup/setup_constants.cc2
-rw-r--r--chrome/installer/setup/setup_constants.h2
-rwxr-xr-xchrome/installer/util/util_constants.cc1
-rwxr-xr-xchrome/installer/util/util_constants.h1
-rw-r--r--chrome/test/mini_installer_test/chrome_mini_installer.cc2
9 files changed, 15 insertions, 15 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index c09f99f..bc25e95 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -220,12 +220,17 @@ int BrowserMain(const MainFunctionParams& parameters) {
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
MessageWindow message_window(user_data_dir);
+ bool is_first_run = FirstRun::IsChromeFirstRun() ||
+ parsed_command_line.HasSwitch(switches::kFirstRun);
+ bool first_run_ui_bypass = false;
+
scoped_ptr<BrowserProcess> browser_process;
if (parsed_command_line.HasSwitch(switches::kImport)) {
// We use different BrowserProcess when importing so no GoogleURLTracker is
// instantiated (as it makes a URLRequest and we don't have an IO thread,
// see bug #1292702).
browser_process.reset(new FirstRunBrowserProcess(parsed_command_line));
+ is_first_run = false;
} else {
browser_process.reset(new BrowserProcessImpl(parsed_command_line));
}
@@ -242,10 +247,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
PrefService* local_state = browser_process->local_state();
DCHECK(local_state);
- bool is_first_run = FirstRun::IsChromeFirstRun() ||
- parsed_command_line.HasSwitch(switches::kFirstRun);
- bool first_run_ui_bypass = false;
-
// Initialize ResourceBundle which handles files loaded from external
// sources. This has to be done before uninstall code path and before prefs
// are registered.
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc
index 21e29f9..ec747a2 100755
--- a/chrome/browser/first_run.cc
+++ b/chrome/browser/first_run.cc
@@ -116,12 +116,13 @@ bool InvokeGoogleUpdateForRename() {
}
bool LaunchSetupWithParam(const std::wstring& param, int* ret_code) {
- std::wstring exe_path;
- if (!PathService::Get(base::DIR_EXE, &exe_path))
+ FilePath exe_path;
+ if (!PathService::Get(base::DIR_MODULE, &exe_path))
return false;
- file_util::AppendToPath(&exe_path, installer_util::kSetupExe);
+ exe_path.Append(installer_util::kInstallerDir);
+ exe_path.Append(installer_util::kSetupExe);
base::ProcessHandle ph;
- CommandLine cl(exe_path);
+ CommandLine cl(exe_path.ToWStringHack());
cl.AppendSwitch(param);
if (!base::LaunchApp(cl, false, false, &ph))
return false;
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc
index 2177eb9..0519a15 100755
--- a/chrome/installer/setup/main.cc
+++ b/chrome/installer/setup/main.cc
@@ -46,7 +46,7 @@ int PatchArchiveFile(bool system_install, const std::wstring& archive_path,
installer::GetChromeInstallPath(system_install);
file_util::AppendToPath(&existing_archive,
installed_version->GetString());
- file_util::AppendToPath(&existing_archive, installer::kInstallerDir);
+ file_util::AppendToPath(&existing_archive, installer_util::kInstallerDir);
file_util::AppendToPath(&existing_archive, installer::kChromeArchive);
std::wstring patch_archive(archive_path);
diff --git a/chrome/installer/setup/setup.cc b/chrome/installer/setup/setup.cc
index 0fe3afb..046edd2 100755
--- a/chrome/installer/setup/setup.cc
+++ b/chrome/installer/setup/setup.cc
@@ -184,7 +184,7 @@ std::wstring installer::GetInstallerPathUnderChrome(
const std::wstring& install_path, const std::wstring& new_version) {
std::wstring installer_path(install_path);
file_util::AppendToPath(&installer_path, new_version);
- file_util::AppendToPath(&installer_path, installer::kInstallerDir);
+ file_util::AppendToPath(&installer_path, installer_util::kInstallerDir);
return installer_path;
}
diff --git a/chrome/installer/setup/setup_constants.cc b/chrome/installer/setup/setup_constants.cc
index a307b44..300c9d5 100644
--- a/chrome/installer/setup/setup_constants.cc
+++ b/chrome/installer/setup/setup_constants.cc
@@ -17,8 +17,6 @@ const wchar_t kChromeCompressedPatchArchivePrefix[] = L"patch";
const wchar_t kInstallSourceDir[] = L"source";
const wchar_t kInstallSourceChromeDir[] = L"Chrome-bin";
-const wchar_t kInstallerDir[] = L"Installer";
-
const wchar_t kMediaPlayerRegPath[] = L"Software\\Microsoft\\MediaPlayer\\ShimInclusionList";
} // namespace installer
diff --git a/chrome/installer/setup/setup_constants.h b/chrome/installer/setup/setup_constants.h
index b95d774..fda44e9 100644
--- a/chrome/installer/setup/setup_constants.h
+++ b/chrome/installer/setup/setup_constants.h
@@ -19,8 +19,6 @@ extern const wchar_t kChromeCompressedPatchArchivePrefix[];
extern const wchar_t kInstallSourceDir[];
extern const wchar_t kInstallSourceChromeDir[];
-extern const wchar_t kInstallerDir[];
-
extern const wchar_t kMediaPlayerRegPath[];
} // namespace installer
diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc
index 3fdace4..ab695e1 100755
--- a/chrome/installer/util/util_constants.cc
+++ b/chrome/installer/util/util_constants.cc
@@ -77,6 +77,7 @@ const wchar_t kChromeOldExe[] = L"old_chrome.exe";
const wchar_t kChromeNewExe[] = L"new_chrome.exe";
const wchar_t kChromeDll[] = L"chrome.dll";
const wchar_t kSetupExe[] = L"setup.exe";
+const wchar_t kInstallerDir[] = L"Installer";
const wchar_t kUninstallStringField[] = L"UninstallString";
const wchar_t kUninstallDisplayNameField[] = L"DisplayName";
diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h
index 1c4e792..aa2b27f 100755
--- a/chrome/installer/util/util_constants.h
+++ b/chrome/installer/util/util_constants.h
@@ -88,6 +88,7 @@ extern const wchar_t kChromeOldExe[];
extern const wchar_t kChromeNewExe[];
extern const wchar_t kChromeDll[];
extern const wchar_t kSetupExe[];
+extern const wchar_t kInstallerDir[];
extern const wchar_t kUninstallStringField[];
extern const wchar_t kUninstallDisplayNameField[];
diff --git a/chrome/test/mini_installer_test/chrome_mini_installer.cc b/chrome/test/mini_installer_test/chrome_mini_installer.cc
index 424071d..f406165 100644
--- a/chrome/test/mini_installer_test/chrome_mini_installer.cc
+++ b/chrome/test/mini_installer_test/chrome_mini_installer.cc
@@ -242,7 +242,7 @@ std::wstring ChromeMiniInstaller::GetUninstallPath() {
path = GetChromeInstallDirectoryLocation();
file_util::AppendToPath(&path, mini_installer_constants::kChromeAppDir);
file_util::AppendToPath(&path, GetRegistryKey());
- file_util::AppendToPath(&path, installer::kInstallerDir);
+ file_util::AppendToPath(&path, installer_util::kInstallerDir);
file_util::AppendToPath(&path,
mini_installer_constants::kChromeSetupExecutable);
printf("uninstall path is %ls\n", path.c_str());