summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 23:25:51 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 23:25:51 +0000
commit201d620bb220a0bddd18376527ed6142bb5ff845 (patch)
tree10e1772ee4dfd74ccdc6fbc71867f07db80aa043 /chrome/browser/first_run
parent5b2d3853536a12823855589d9876089c0f3affbd (diff)
downloadchromium_src-201d620bb220a0bddd18376527ed6142bb5ff845.zip
chromium_src-201d620bb220a0bddd18376527ed6142bb5ff845.tar.gz
chromium_src-201d620bb220a0bddd18376527ed6142bb5ff845.tar.bz2
first-run: Make two specific windows functions private to first_run_win.cc
The functions are called only once and they are not needed outside of first_run_win.cc. So remove it from FirstRun class and move them to the unnamed namespace. BUG=None TEST=None R=jhawkins@chromium.org Review URL: http://codereview.chromium.org/6880043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r--chrome/browser/first_run/first_run.h8
-rw-r--r--chrome/browser/first_run/first_run_win.cc57
2 files changed, 33 insertions, 32 deletions
diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h
index 5e9d80e..b5d27e3 100644
--- a/chrome/browser/first_run/first_run.h
+++ b/chrome/browser/first_run/first_run.h
@@ -56,14 +56,6 @@ class FirstRun {
std::vector<GURL> bookmarks;
};
-#if defined(OS_WIN)
- // Creates the desktop shortcut to chrome for the current user. Returns
- // false if it fails. It will overwrite the shortcut if it exists.
- static bool CreateChromeDesktopShortcut();
- // Creates the quick launch shortcut to chrome for the current user. Returns
- // false if it fails. It will overwrite the shortcut if it exists.
- static bool CreateChromeQuickLaunchShortcut();
-#endif // OS_WIN
// Import bookmarks and/or browser items (depending on platform support)
// in this process. This function is paired with FirstRun::ImportSettings().
// This function might or might not show a visible UI depending on the
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 0e321dd..67e2918 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -92,6 +92,38 @@ class FirstRunDelayedTasks : public NotificationObserver {
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)
+ return false;
+ return ShellUtil::CreateChromeDesktopShortcut(
+ dist,
+ chrome_exe.value(),
+ dist->GetAppDescription(),
+ ShellUtil::CURRENT_USER,
+ false,
+ true); // create if doesn't exist.
+}
+
+// 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();
+ return ShellUtil::CreateChromeQuickLaunchShortcut(
+ dist,
+ chrome_exe.value(),
+ ShellUtil::CURRENT_USER, // create only for current user.
+ true); // create if doesn't exist.
+}
+
} // namespace
bool FirstRun::LaunchSetupWithParam(const std::string& param,
@@ -136,28 +168,6 @@ void FirstRun::DoDelayedInstallExtensions() {
new FirstRunDelayedTasks(FirstRunDelayedTasks::INSTALL_EXTENSIONS);
}
-bool FirstRun::CreateChromeDesktopShortcut() {
- FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe))
- return false;
- BrowserDistribution *dist = BrowserDistribution::GetDistribution();
- if (!dist)
- return false;
- return ShellUtil::CreateChromeDesktopShortcut(dist, chrome_exe.value(),
- dist->GetAppDescription(), ShellUtil::CURRENT_USER,
- false, true); // create if doesn't exist.
-}
-
-bool FirstRun::CreateChromeQuickLaunchShortcut() {
- FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe))
- return false;
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- return ShellUtil::CreateChromeQuickLaunchShortcut(dist, chrome_exe.value(),
- ShellUtil::CURRENT_USER, // create only for current user.
- true); // create if doesn't exist.
-}
-
namespace {
// This class is used by FirstRun::ImportSettings to determine when the import
@@ -281,7 +291,7 @@ bool DecodeImportParams(const std::string& encoded,
// static
void FirstRun::PlatformSetup() {
- FirstRun::CreateChromeDesktopShortcut();
+ CreateChromeDesktopShortcut();
// Windows 7 has deprecated the quick launch bar.
if (base::win::GetVersion() < base::win::VERSION_WIN7)
CreateChromeQuickLaunchShortcut();
@@ -398,4 +408,3 @@ int FirstRun::ImportFromBrowser(Profile* profile,
importer_observer.RunLoop();
return importer_observer.import_result();
}
-