summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser_main.cc6
-rw-r--r--chrome/browser/first_run.cc40
-rw-r--r--chrome/browser/first_run.h6
-rw-r--r--chrome/installer/setup/setup.cc60
-rw-r--r--chrome/installer/setup/uninstall.cc7
-rw-r--r--chrome/installer/util/shell_util.cc166
-rw-r--r--chrome/installer/util/shell_util.h57
-rw-r--r--chrome/installer/util/util_constants.cc21
-rw-r--r--chrome/installer/util/util_constants.h5
9 files changed, 275 insertions, 93 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 190376b..7ec1830 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -53,6 +53,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
+#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/version.h"
#include "chrome/views/accelerator_handler.h"
#include "net/base/net_module.h"
@@ -167,9 +168,10 @@ int DoUninstallTasks() {
ResultCodes::ExitCode ret = ResultCodes::NORMAL_EXIT;
if (!FirstRun::RemoveSentinel())
ret = ResultCodes::UNINSTALL_DELETE_FILE_ERROR;
- if (!FirstRun::RemoveChromeDesktopShortcut())
+ // We only want to modify user level shortcuts so pass false for system_level.
+ if (!ShellUtil::RemoveChromeDesktopShortcut(ShellUtil::CURRENT_USER))
ret = ResultCodes::UNINSTALL_DELETE_FILE_ERROR;
- if (!FirstRun::RemoveChromeQuickLaunchShortcut())
+ if (!ShellUtil::RemoveChromeQuickLaunchShortcut(ShellUtil::CURRENT_USER))
ret = ResultCodes::UNINSTALL_DELETE_FILE_ERROR;
return ret;
}
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc
index f0e7dd2..b4b750e 100644
--- a/chrome/browser/first_run.cc
+++ b/chrome/browser/first_run.cc
@@ -93,41 +93,21 @@ bool FirstRun::IsChromeFirstRun() {
}
bool FirstRun::CreateChromeDesktopShortcut() {
- std::wstring chrome_exe, shortcut_path, shortcut_name;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe) ||
- !ShellUtil::GetDesktopPath(&shortcut_path) ||
- !ShellUtil::GetChromeShortcutName(&shortcut_name))
+ std::wstring chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe))
return false;
- file_util::AppendToPath(&shortcut_path, shortcut_name);
- return ShellUtil::UpdateChromeShortcut(chrome_exe, shortcut_path, true);
-}
-
-bool FirstRun::RemoveChromeDesktopShortcut() {
- std::wstring shortcut_path, shortcut_name;
- if (!ShellUtil::GetDesktopPath(&shortcut_path) ||
- !ShellUtil::GetChromeShortcutName(&shortcut_name))
- return false;
- file_util::AppendToPath(&shortcut_path, shortcut_name);
- return file_util::Delete(shortcut_path, false);
+ return ShellUtil::CreateChromeDesktopShortcut(chrome_exe,
+ ShellUtil::CURRENT_USER, // create only for current user
+ true); // create if doesnt exist
}
bool FirstRun::CreateChromeQuickLaunchShortcut() {
- std::wstring chrome_exe, shortcut_path, shortcut_name;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe) ||
- !ShellUtil::GetQuickLaunchPath(&shortcut_path) ||
- !ShellUtil::GetChromeShortcutName(&shortcut_name))
- return false;
- file_util::AppendToPath(&shortcut_path, shortcut_name);
- return ShellUtil::UpdateChromeShortcut(chrome_exe, shortcut_path, true);
-}
-
-bool FirstRun::RemoveChromeQuickLaunchShortcut() {
- std::wstring shortcut_path, shortcut_name;
- if (!ShellUtil::GetQuickLaunchPath(&shortcut_path) ||
- !ShellUtil::GetChromeShortcutName(&shortcut_name))
+ std::wstring chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe))
return false;
- file_util::AppendToPath(&shortcut_path, shortcut_name);
- return file_util::Delete(shortcut_path, false);
+ return ShellUtil::CreateChromeQuickLaunchShortcut(chrome_exe,
+ ShellUtil::CURRENT_USER, // create only for current user
+ true); // create if doesnt exist
}
bool FirstRun::RemoveSentinel() {
diff --git a/chrome/browser/first_run.h b/chrome/browser/first_run.h
index c9e439c..dc75760 100644
--- a/chrome/browser/first_run.h
+++ b/chrome/browser/first_run.h
@@ -32,12 +32,6 @@ class FirstRun {
static bool CreateChromeQuickLaunchShortcut();
// Creates the sentinel file that signals that chrome has been configured.
static bool CreateSentinel();
- // Removes the desktop shortcut to chrome. Returns false if it could not
- // be removed.
- static bool RemoveChromeDesktopShortcut();
- // Removes the quick launch shortcut to chrome. Returns false if it could not
- // be removed.
- static bool RemoveChromeQuickLaunchShortcut();
// Removes the sentinel file created in ConfigDone(). Returns false if the
// sentinel file could not be removed.
static bool RemoveSentinel();
diff --git a/chrome/installer/setup/setup.cc b/chrome/installer/setup/setup.cc
index 8a301da..9b375be 100644
--- a/chrome/installer/setup/setup.cc
+++ b/chrome/installer/setup/setup.cc
@@ -6,6 +6,7 @@
#include "chrome/installer/setup/setup.h"
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/registry.h"
@@ -39,22 +40,6 @@ void AddChromeToMediaPlayerList() {
}
-// Update shortcuts that are created by chrome.exe during first run, but
-// we take care of updating them in case the location of chrome.exe changes.
-void UpdateChromeExeShortcuts(const std::wstring& chrome_exe) {
- std::wstring desktop_shortcut, ql_shortcut, shortcut_name;
- if (!ShellUtil::GetQuickLaunchPath(&ql_shortcut) ||
- !ShellUtil::GetDesktopPath(&desktop_shortcut) ||
- !ShellUtil::GetChromeShortcutName(&shortcut_name))
- return;
- file_util::AppendToPath(&ql_shortcut, shortcut_name);
- file_util::AppendToPath(&desktop_shortcut, shortcut_name);
-
- // Go ahead and update the shortcuts if they exist.
- ShellUtil::UpdateChromeShortcut(chrome_exe, ql_shortcut, false);
- ShellUtil::UpdateChromeShortcut(chrome_exe, desktop_shortcut, false);
-}
-
// This method creates Chrome shortcuts in Start->Programs for all users or
// only for current user depending on whether it is system wide install or
// user only install.
@@ -94,7 +79,7 @@ bool CreateOrUpdateChromeShortcuts(const std::wstring& exe_path,
// - The shortcut already exists in case of updates (user may have deleted
// shortcuts since our install. So on updates we only update if shortcut
// already exists)
- bool ret1 = true;
+ bool ret = true;
std::wstring chrome_link(shortcut_path); // Chrome link (launches Chrome)
file_util::AppendToPath(&chrome_link, product_name + L".lnk");
std::wstring chrome_exe(install_path); // Chrome link target
@@ -106,15 +91,16 @@ bool CreateOrUpdateChromeShortcuts(const std::wstring& exe_path,
file_util::CreateDirectoryW(shortcut_path);
LOG(INFO) << "Creating shortcut to " << chrome_exe << " at " << chrome_link;
- ShellUtil::UpdateChromeShortcut(chrome_exe, chrome_link, true);
+ ret = ret && ShellUtil::UpdateChromeShortcut(chrome_exe, chrome_link, true);
} else if (file_util::PathExists(chrome_link)) {
LOG(INFO) << "Updating shortcut at " << chrome_link
<< " to point to " << chrome_exe;
- ShellUtil::UpdateChromeShortcut(chrome_exe, chrome_link, false);
+ ret = ret && ShellUtil::UpdateChromeShortcut(chrome_exe,
+ chrome_link,
+ false); // do not create new
}
// Create/update uninstall link
- bool ret2 = true;
std::wstring uninstall_link(shortcut_path); // Uninstall Chrome link
file_util::AppendToPath(&uninstall_link,
dist->GetUninstallLinkName() + L".lnk");
@@ -136,19 +122,33 @@ bool CreateOrUpdateChromeShortcuts(const std::wstring& exe_path,
LOG(INFO) << "Creating/updating uninstall link at " << uninstall_link;
std::wstring target_folder = file_util::GetDirectoryFromPath(install_path);
- ret2 = file_util::CreateShortcutLink(setup_exe.c_str(),
- uninstall_link.c_str(),
- target_folder.c_str(),
- arguments.c_str(),
- NULL,
- setup_exe.c_str(),
- 0);
+ ret = ret && file_util::CreateShortcutLink(setup_exe.c_str(),
+ uninstall_link.c_str(),
+ target_folder.c_str(),
+ arguments.c_str(),
+ NULL, setup_exe.c_str(), 0);
}
- // Update Desktop and Quick Launch shortcuts (only if they already exist)
- UpdateChromeExeShortcuts(chrome_exe);
+ // Update Desktop and Quick Launch shortcuts. If --create-new-shortcuts
+ // is specified we want to create them, otherwise we update them only if
+ // they exist.
+ bool create = false; // Only update; do not create, if they do not exist
+ CommandLine cmd_line;
+ if (cmd_line.HasSwitch(installer_util::switches::kCreateAllShortcuts))
+ create = true;
+ if (system_install) {
+ ret = ret && ShellUtil::CreateChromeDesktopShortcut(chrome_exe,
+ ShellUtil::SYSTEM_LEVEL, create);
+ ret = ret && ShellUtil::CreateChromeQuickLaunchShortcut(chrome_exe,
+ ShellUtil::CURRENT_USER | ShellUtil::SYSTEM_LEVEL, create);
+ } else {
+ ret = ret && ShellUtil::CreateChromeDesktopShortcut(chrome_exe,
+ ShellUtil::CURRENT_USER, create);
+ ret = ret && ShellUtil::CreateChromeQuickLaunchShortcut(chrome_exe,
+ ShellUtil::CURRENT_USER, create);
+ }
- return ret1 && ret2;
+ return ret;
}
} // namespace
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index dfaafb0..5136f88 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -43,6 +43,13 @@ void DeleteChromeShortcut(bool system_uninstall) {
std::wstring shortcut_path;
if (system_uninstall) {
PathService::Get(base::DIR_COMMON_START_MENU, &shortcut_path);
+ // In case of system level uninstall, we want to remove desktop and
+ // Quick Launch shortcuts also. In case of user level uninstall,
+ // chrome.exe deletes these shortcuts.
+ ShellUtil::RemoveChromeDesktopShortcut(ShellUtil::CURRENT_USER |
+ ShellUtil::SYSTEM_LEVEL);
+ ShellUtil::RemoveChromeQuickLaunchShortcut(ShellUtil::CURRENT_USER |
+ ShellUtil::SYSTEM_LEVEL);
} else {
PathService::Get(base::DIR_START_MENU, &shortcut_path);
}
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 9e4215f..550a7a4 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -269,7 +269,6 @@ const wchar_t* ShellUtil::kFileAssociations[] = {L".htm", L".html", L".shtml",
const wchar_t* ShellUtil::kProtocolAssociations[] = {L"ftp", L"http", L"https",
NULL};
-
ShellUtil::RegisterStatus ShellUtil::AddChromeToSetAccessDefaults(
const std::wstring& chrome_exe, bool skip_if_not_admin) {
if (IsChromeRegistered(chrome_exe))
@@ -305,23 +304,172 @@ bool ShellUtil::GetChromeShortcutName(std::wstring* shortcut) {
return true;
}
-bool ShellUtil::GetDesktopPath(std::wstring* path) {
+bool ShellUtil::GetDesktopPath(bool system_level, std::wstring* path) {
wchar_t desktop[MAX_PATH];
- if (FAILED(SHGetFolderPath(NULL, CSIDL_DESKTOP, NULL, SHGFP_TYPE_CURRENT,
- desktop)))
+ int dir = system_level ? CSIDL_COMMON_DESKTOPDIRECTORY : CSIDL_DESKTOP;
+ if (FAILED(SHGetFolderPath(NULL, dir, NULL, SHGFP_TYPE_CURRENT, desktop)))
return false;
*path = desktop;
return true;
}
-bool ShellUtil::GetQuickLaunchPath(std::wstring* path) {
- if (!PathService::Get(base::DIR_APP_DATA, path))
- return false;
- // This path works on Vista as well.
- file_util::AppendToPath(path, L"Microsoft\\Internet Explorer\\Quick Launch");
+bool ShellUtil::GetQuickLaunchPath(bool system_level, std::wstring* path) {
+ const static wchar_t* kQuickLaunchPath =
+ L"Microsoft\\Internet Explorer\\Quick Launch";
+ wchar_t qlaunch[MAX_PATH];
+ if (system_level) {
+ // We are accessing GetDefaultUserProfileDirectory this way so that we do
+ // not have to declare dependency to Userenv.lib for chrome.exe
+ typedef BOOL (WINAPI *PROFILE_FUNC)(LPWSTR, LPDWORD);
+ HMODULE module = LoadLibrary(L"Userenv.dll");
+ PROFILE_FUNC p = reinterpret_cast<PROFILE_FUNC>(GetProcAddress(module,
+ "GetDefaultUserProfileDirectoryW"));
+ DWORD size = MAX_PATH;
+ if ((p == NULL) || ((p)(qlaunch, &size) != TRUE))
+ return false;
+ *path = qlaunch;
+ if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) {
+ file_util::AppendToPath(path, L"AppData\\Roaming");
+ } else {
+ file_util::AppendToPath(path, L"Application Data");
+ }
+ } else {
+ if (FAILED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL,
+ SHGFP_TYPE_CURRENT, qlaunch)))
+ return false;
+ *path = qlaunch;
+ }
+ file_util::AppendToPath(path, kQuickLaunchPath);
return true;
}
+bool ShellUtil::CreateChromeDesktopShortcut(const std::wstring& chrome_exe,
+ int shell_change,
+ bool create_new) {
+ std::wstring shortcut_name;
+ if (!ShellUtil::GetChromeShortcutName(&shortcut_name))
+ return false;
+
+ bool ret = true;
+ if (shell_change & ShellUtil::CURRENT_USER) {
+ std::wstring shortcut_path;
+ if (ShellUtil::GetDesktopPath(false, &shortcut_path)) {
+ file_util::AppendToPath(&shortcut_path, shortcut_name);
+ ret = ret && ShellUtil::UpdateChromeShortcut(chrome_exe, shortcut_path,
+ create_new);
+ } else {
+ ret = false;
+ }
+ }
+
+ if (shell_change & ShellUtil::SYSTEM_LEVEL) {
+ std::wstring shortcut_path;
+ if (ShellUtil::GetDesktopPath(true, &shortcut_path)) {
+ file_util::AppendToPath(&shortcut_path, shortcut_name);
+ ret = ret && ShellUtil::UpdateChromeShortcut(chrome_exe, shortcut_path,
+ create_new);
+ } else {
+ ret = false;
+ }
+ }
+ return ret;
+}
+
+bool ShellUtil::CreateChromeQuickLaunchShortcut(const std::wstring& chrome_exe,
+ int shell_change,
+ bool create_new) {
+ std::wstring shortcut_name;
+ if (!ShellUtil::GetChromeShortcutName(&shortcut_name))
+ return false;
+
+ bool ret = true;
+ // First create shortcut for the current user.
+ if (shell_change & ShellUtil::CURRENT_USER) {
+ std::wstring user_ql_path;
+ if (ShellUtil::GetQuickLaunchPath(false, &user_ql_path)) {
+ file_util::AppendToPath(&user_ql_path, shortcut_name);
+ ret = ret && ShellUtil::UpdateChromeShortcut(chrome_exe, user_ql_path,
+ create_new);
+ } else {
+ ret = false;
+ }
+ }
+
+ // Add a shortcut to Default User's profile so that all new user profiles
+ // get it.
+ if (shell_change & ShellUtil::SYSTEM_LEVEL) {
+ std::wstring default_ql_path;
+ if (ShellUtil::GetQuickLaunchPath(true, &default_ql_path)) {
+ file_util::AppendToPath(&default_ql_path, shortcut_name);
+ ret = ret && ShellUtil::UpdateChromeShortcut(chrome_exe, default_ql_path,
+ create_new);
+ } else {
+ ret = false;
+ }
+ }
+
+ return ret;
+}
+
+bool ShellUtil::RemoveChromeDesktopShortcut(int shell_change) {
+ std::wstring shortcut_name;
+ if (!ShellUtil::GetChromeShortcutName(&shortcut_name))
+ return false;
+
+ bool ret = true;
+ if (shell_change & ShellUtil::CURRENT_USER) {
+ std::wstring shortcut_path;
+ if (ShellUtil::GetDesktopPath(false, &shortcut_path)) {
+ file_util::AppendToPath(&shortcut_path, shortcut_name);
+ ret = ret && file_util::Delete(shortcut_path, false);
+ } else {
+ ret = false;
+ }
+ }
+
+ if (shell_change & ShellUtil::SYSTEM_LEVEL) {
+ std::wstring shortcut_path;
+ if (ShellUtil::GetDesktopPath(true, &shortcut_path)) {
+ file_util::AppendToPath(&shortcut_path, shortcut_name);
+ ret = ret && file_util::Delete(shortcut_path, false);
+ } else {
+ ret = false;
+ }
+ }
+ return ret;
+}
+
+bool ShellUtil::RemoveChromeQuickLaunchShortcut(int shell_change) {
+ std::wstring shortcut_name;
+ if (!ShellUtil::GetChromeShortcutName(&shortcut_name))
+ return false;
+
+ bool ret = true;
+ // First remove shortcut for the current user.
+ if (shell_change & ShellUtil::CURRENT_USER) {
+ std::wstring user_ql_path;
+ if (ShellUtil::GetQuickLaunchPath(false, &user_ql_path)) {
+ file_util::AppendToPath(&user_ql_path, shortcut_name);
+ ret = ret && file_util::Delete(user_ql_path, false);
+ } else {
+ ret = false;
+ }
+ }
+
+ // Delete shortcut in Default User's profile
+ if (shell_change & ShellUtil::SYSTEM_LEVEL) {
+ std::wstring default_ql_path;
+ if (ShellUtil::GetQuickLaunchPath(true, &default_ql_path)) {
+ file_util::AppendToPath(&default_ql_path, shortcut_name);
+ ret = ret && file_util::Delete(default_ql_path, false);
+ } else {
+ ret = false;
+ }
+ }
+
+ return ret;
+}
+
bool ShellUtil::UpdateChromeShortcut(const std::wstring& chrome_exe,
const std::wstring& shortcut,
bool create_new) {
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h
index a00db25..7c8b8fd 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -19,6 +19,12 @@
// that can be used by installer as well as Chrome.
class ShellUtil {
public:
+ // Input to any methods that make changes to OS shell.
+ enum ShellChange {
+ CURRENT_USER = 0x1, // Make any shell changes only at the user level
+ SYSTEM_LEVEL = 0x2 // Make any shell changes only at the system level
+ };
+
// Return value of AddChromeToSetAccessDefaults.
enum RegisterStatus {
SUCCESS, // Registration of Chrome successful (in HKLM)
@@ -86,6 +92,30 @@ class ShellUtil {
static RegisterStatus AddChromeToSetAccessDefaults(
const std::wstring& chrome_exe, bool skip_if_not_admin);
+ // Create Chrome shortcut on Desktop
+ // If shell_change is CURRENT_USER, the shortcut is created in the
+ // Desktop folder of current user's profile.
+ // If shell_change is SYSTEM_LEVEL, the shortcut is created in the
+ // Desktop folder of "All Users" profile.
+ // create_new: If false, will only update the shortcut. If true, the function
+ // will create a new shortcut if it doesn't exist already.
+ static bool CreateChromeDesktopShortcut(const std::wstring& chrome_exe,
+ int shell_change,
+ bool create_new);
+
+ // Create Chrome shortcut on Quick Launch Bar.
+ // If shell_change is CURRENT_USER, the shortcut is created in the
+ // Quick Launch folder of current user's profile.
+ // If shell_change is SYSTEM_LEVEL, the shortcut is created in the
+ // Quick Launch folder of "Default User" profile. This will make sure
+ // that this shortcut will be seen by all the new users logging into the
+ // system.
+ // create_new: If false, will only update the shortcut. If true, the function
+ // will create a new shortcut if it doesn't exist already.
+ static bool CreateChromeQuickLaunchShortcut(const std::wstring& chrome_exe,
+ int shell_change,
+ bool create_new);
+
// This method appends the Chrome icon index inside chrome.exe to the
// chrome.exe path passed in as input, to generate the full path for
// Chrome icon that can be used as value for Windows registry keys.
@@ -95,14 +125,31 @@ class ShellUtil {
// Returns the localized name of Chrome shortcut.
static bool GetChromeShortcutName(std::wstring* shortcut);
- // Gets the desktop path for the current user and returns it in 'path'
- // argument. Return true if successful, otherwise returns false.
- static bool GetDesktopPath(std::wstring* path);
+ // Gets the desktop path for the current user or all users (if system_level
+ // is true) and returns it in 'path' argument. Return true if successful,
+ // otherwise returns false.
+ static bool GetDesktopPath(bool system_level, std::wstring* path);
// Gets the Quick Launch shortcuts path for the current user and
// returns it in 'path' argument. Return true if successful, otherwise
- // returns false.
- static bool GetQuickLaunchPath(std::wstring* path);
+ // returns false. If system_level is true this function returns the path
+ // to Default Users Quick Launch shortcuts path. Adding a shortcut to Default
+ // User's profile only affects any new user profiles (not existing ones).
+ static bool GetQuickLaunchPath(bool system_level, std::wstring* path);
+
+ // Remove Chrome shortcut from Desktop.
+ // If shell_change is CURRENT_USER, the shortcut is removed from the
+ // Desktop folder of current user's profile.
+ // If shell_change is SYSTEM_LEVEL, the shortcut is removed from the
+ // Desktop folder of "All Users" profile.
+ static bool RemoveChromeDesktopShortcut(int shell_change);
+
+ // Remove Chrome shortcut from Quick Launch Bar.
+ // If shell_change is CURRENT_USER, the shortcut is removed from
+ // the Quick Launch folder of current user's profile.
+ // If shell_change is SYSTEM_LEVEL, the shortcut is removed from
+ // the Quick Launch folder of "Default User" profile.
+ static bool RemoveChromeQuickLaunchShortcut(int shell_change);
// Updates shortcut (or creates a new shortcut) at destination given by
// shortcut to a target given by chrome_exe. The arguments is left NULL
diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc
index 19934f69..283683e 100644
--- a/chrome/installer/util/util_constants.cc
+++ b/chrome/installer/util/util_constants.cc
@@ -8,12 +8,24 @@ namespace installer_util {
namespace switches {
+// Create Desktop and QuickLaunch shortcuts
+const wchar_t kCreateAllShortcuts[] = L"create-all-shortcuts";
+
// Disable logging
const wchar_t kDisableLogging[] = L"disable-logging";
+// By default we remove all shared (between users) files, registry entries etc
+// during uninstall. If this option is specified together with kUninstall option
+// we do not clean up shared entries otherwise this option is ignored.
+const wchar_t kDoNotRemoveSharedItems[] = L"do-not-remove-shared-items";
+
// Enable logging at the error level. This is the default behavior.
const wchar_t kEnableLogging[] = L"enable-logging";
+// If present, setup will uninstall chrome without asking for any
+// confirmation from user.
+const wchar_t kForceUninstall[] = L"force-uninstall";
+
// Specify the file path of Chrome archive for install.
const wchar_t kInstallArchive[] = L"install-archive";
@@ -25,21 +37,12 @@ const wchar_t kLogFile[] = L"log-file";
// options kInstallArchive and kUninstall are ignored.
const wchar_t kRegisterChromeBrowser[] = L"register-chrome-browser";
-// By default we remove all shared (between users) files, registry entries etc
-// during uninstall. If this option is specified together with kUninstall option
-// we do not clean up shared entries otherwise this option is ignored.
-const wchar_t kDoNotRemoveSharedItems[] = L"do-not-remove-shared-items";
-
// Install Chrome to system wise location. The default is per user install.
const wchar_t kSystemLevel[] = L"system-level";
// If present, setup will uninstall chrome.
const wchar_t kUninstall[] = L"uninstall";
-// If present, setup will uninstall chrome without asking for any
-// confirmation from user.
-const wchar_t kForceUninstall[] = L"force-uninstall";
-
// Enable verbose logging (info level).
const wchar_t kVerboseLogging[] = L"verbose-logging";
diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h
index 41f5a3ed..448ef31 100644
--- a/chrome/installer/util/util_constants.h
+++ b/chrome/installer/util/util_constants.h
@@ -34,15 +34,16 @@ enum InstallStatus {
};
namespace switches {
+extern const wchar_t kCreateAllShortcuts[];
extern const wchar_t kDisableLogging[];
+extern const wchar_t kDoNotRemoveSharedItems[];
extern const wchar_t kEnableLogging[];
+extern const wchar_t kForceUninstall[];
extern const wchar_t kInstallArchive[];
extern const wchar_t kLogFile[];
extern const wchar_t kRegisterChromeBrowser[];
-extern const wchar_t kDoNotRemoveSharedItems[];
extern const wchar_t kSystemLevel[];
extern const wchar_t kUninstall[];
-extern const wchar_t kForceUninstall[];
extern const wchar_t kVerboseLogging[];
} // namespace switches