Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5219)

Unified Diff: chrome/browser/first_run/first_run_win.cc

Issue 11636031: [Fixit Dec-2012] Refactor first_run, very few things should depend on whether the First Run senti... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No first run import test on OS_CHROMEOS. Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/first_run/first_run_posix.cc ('k') | chrome/browser/process_singleton_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run_win.cc
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 0ad9b17c9bd139f6a521729ecb9de9c862f4c2e1..0afde7242ecba8686469fae4cb5b6a4a8d04952e 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -10,12 +10,15 @@
#include "base/callback.h"
#include "base/environment.h"
+#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/stringprintf.h"
+#include "base/threading/sequenced_worker_pool.h"
+#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "base/win/metro.h"
#include "base/win/object_watcher.h"
@@ -43,6 +46,7 @@
#include "chrome/installer/util/master_preferences_constants.h"
#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/util_constants.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
#include "google_update/google_update_idl.h"
@@ -379,6 +383,24 @@ bool ImportSettingsWin(Profile* profile,
namespace first_run {
namespace internal {
+void DoPostImportPlatformSpecificTasks() {
+ // Trigger the Active Setup command for system-level Chromes to finish
+ // configuring this user's install (e.g. per-user shortcuts).
+ // Delay the task slightly to give Chrome launch I/O priority while also
+ // making sure shortcuts are created promptly to avoid annoying the user by
+ // re-creating shortcuts he previously deleted.
+ static const int64 kTiggerActiveSetupDelaySeconds = 5;
+ FilePath chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
+ NOTREACHED();
+ } else if (!InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) {
+ content::BrowserThread::GetBlockingPool()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&InstallUtil::TriggerActiveSetupCommand),
+ base::TimeDelta::FromSeconds(kTiggerActiveSetupDelaySeconds));
+ }
+}
+
bool ImportSettings(Profile* profile,
scoped_refptr<ImporterHost> importer_host,
scoped_refptr<ImporterList> importer_list,
« no previous file with comments | « chrome/browser/first_run/first_run_posix.cc ('k') | chrome/browser/process_singleton_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698