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); |