summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 04:57:32 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 04:57:32 +0000
commitec509ee186db5eafcd6a42200241e74e339d1773 (patch)
tree57a979326f17417846e23e6a8b739328901adffa /chrome/browser/first_run
parent4229cfe9358eab93c43f2ecf3d0e1df7b9bc9ee2 (diff)
downloadchromium_src-ec509ee186db5eafcd6a42200241e74e339d1773.zip
chromium_src-ec509ee186db5eafcd6a42200241e74e339d1773.tar.gz
chromium_src-ec509ee186db5eafcd6a42200241e74e339d1773.tar.bz2
No longer install all-users shortcuts on system-level installs; instead install per-user shortcuts through Active Setup.
Design doc: https://docs.google.com/a/chromium.org/document/d/1FjFbmKVj0BIP7xBXMs4lLgQcrc--Jl5jiMiwdDxLeOs/edit BUG=148539 TEST=Shortcuts work as described in the design doc :)! installer_util_unittests.exe --gtest_filter=ShellUtilShortcut* setup_unittests.exe --gtest_filter=InstallShortcutTest* Review URL: https://chromiumcodereview.appspot.com/11229010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r--chrome/browser/first_run/first_run.cc1
-rw-r--r--chrome/browser/first_run/first_run_posix.cc3
-rw-r--r--chrome/browser/first_run/first_run_win.cc45
3 files changed, 4 insertions, 45 deletions
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 88a462d..ce1716a 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -147,7 +147,6 @@ int ImportFromFile(Profile* profile, const CommandLine& cmdline) {
namespace first_run {
namespace internal {
-const char* const kSentinelFile = "First Run";
FirstRunState first_run_ = FIRST_RUN_UNKNOWN;
installer::MasterPreferences* LoadMasterPrefs(FilePath* master_prefs_path)
diff --git a/chrome/browser/first_run/first_run_posix.cc b/chrome/browser/first_run/first_run_posix.cc
index 6724ec2..bf81cbb 100644
--- a/chrome/browser/first_run/first_run_posix.cc
+++ b/chrome/browser/first_run/first_run_posix.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/importer/importer_progress_dialog.h"
#include "chrome/browser/importer/importer_progress_observer.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/master_preferences_constants.h"
@@ -66,7 +67,7 @@ bool GetFirstRunSentinelFilePath(FilePath* path) {
if (!PathService::Get(chrome::DIR_USER_DATA, &first_run_sentinel))
return false;
- *path = first_run_sentinel.AppendASCII(kSentinelFile);
+ *path = first_run_sentinel.Append(chrome::kFirstRunSentinel);
return true;
}
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 851c979..4fede553 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -31,6 +31,7 @@
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/shell_integration.h"
+#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_result_codes.h"
@@ -102,46 +103,6 @@ class FirstRunDelayedTasks : public content::NotificationObserver {
content::NotificationRegistrar registrar_;
};
-// Creates the desktop shortcut to chrome for the current user. Returns
-// false if it fails. It will overwrite the shortcut if it exists.
-bool CreateChromeDesktopShortcut() {
- FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe))
- return false;
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- if (!dist || !dist->CanCreateDesktopShortcuts())
- return false;
- ShellUtil::ChromeShortcutProperties shortcut_properties(
- ShellUtil::CURRENT_USER);
- shortcut_properties.set_chrome_exe(chrome_exe);
- return ShellUtil::CreateOrUpdateChromeShortcut(
- ShellUtil::SHORTCUT_DESKTOP, dist, shortcut_properties,
- ShellUtil::SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL);
-}
-
-// Creates the quick launch shortcut to chrome for the current user. Returns
-// false if it fails. It will overwrite the shortcut if it exists.
-bool CreateChromeQuickLaunchShortcut() {
- FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe))
- return false;
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- ShellUtil::ChromeShortcutProperties shortcut_properties(
- ShellUtil::CURRENT_USER);
- shortcut_properties.set_chrome_exe(chrome_exe);
- return ShellUtil::CreateOrUpdateChromeShortcut(
- ShellUtil::SHORTCUT_QUICK_LAUNCH, dist, shortcut_properties,
- ShellUtil::SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL);
-}
-
-void PlatformSetup(Profile* profile) {
- CreateChromeDesktopShortcut();
-
- // Windows 7 has deprecated the quick launch bar.
- if (base::win::GetVersion() < base::win::VERSION_WIN7)
- CreateChromeQuickLaunchShortcut();
-}
-
// Launches the setup exe with the given parameter/value on the command-line.
// For non-metro Windows, it waits for its termination, returns its exit code
// in |*ret_code|, and returns true if the exit code is valid.
@@ -511,7 +472,7 @@ bool ImportSettings(Profile* profile,
bool GetFirstRunSentinelFilePath(FilePath* path) {
return InstallUtil::GetSentinelFilePath(
- kSentinelFile,
+ chrome::kFirstRunSentinel,
BrowserDistribution::GetDistribution(),
path);
}
@@ -573,8 +534,6 @@ void AutoImport(
// discarded, which is the correct behavior during the import process.
process_singleton->Lock(NULL);
- PlatformSetup(profile);
-
scoped_refptr<ImporterHost> importer_host;
importer_host = new ImporterHost;