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

Unified Diff: chrome/installer/util/install_util.cc

Issue 208393020: Fix the new First Run sentinel file path determination. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase; re-upload to kick CQ. Created 6 years, 9 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/installer/util/install_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util.cc
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index 570386e84fb12dfa0506ad4bf3ee395217494aed..11196c4cb2b1e6946b38c472309cf975a9180841 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -28,6 +28,8 @@
#include "base/win/metro.h"
#include "base/win/registry.h"
#include "base/win/windows_version.h"
+#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/helper.h"
@@ -399,10 +401,19 @@ bool InstallUtil::IsChromeSxSProcess() {
return sxs;
}
-bool InstallUtil::GetSentinelFilePath(
- const base::FilePath::CharType* file,
- BrowserDistribution* dist,
- base::FilePath* path) {
+// static
+bool InstallUtil::IsFirstRunSentinelPresent() {
+ // TODO(msw): Consolidate with first_run::internal::IsFirstRunSentinelPresent.
+ base::FilePath user_data_dir;
+ return !PathService::Get(chrome::DIR_USER_DATA, &user_data_dir) ||
gab 2014/04/02 15:06:51 This won't work inside setup.exe. Only chrome.exe
grt (UTC plus 2) 2014/04/02 16:42:12 Nice catch. setup depends on common_constants, so
+ base::PathExists(user_data_dir.Append(chrome::kFirstRunSentinel));
+}
+
+// static
+bool InstallUtil::GetSentinelFilePath(const base::FilePath::CharType* file,
+ BrowserDistribution* dist,
+ base::FilePath* path) {
+ // TODO(msw): Use PathService to obtain the correct DIR_USER_DATA.
std::vector<base::FilePath> user_data_dir_paths;
installer::GetChromeUserDataPaths(dist, &user_data_dir_paths);
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698