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

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: Simplify changes. 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
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..6deee329efccf3fc87bb78b7d5c369f87db8c01c 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,18 @@ bool InstallUtil::IsChromeSxSProcess() {
return sxs;
}
-bool InstallUtil::GetSentinelFilePath(
- const base::FilePath::CharType* file,
- BrowserDistribution* dist,
- base::FilePath* path) {
+// static
+bool InstallUtil::IsFirstRunSentinelPresent() {
+ base::FilePath user_data_dir;
grt (UTC plus 2) 2014/03/27 15:35:20 please add something like: // This duplicates po
msw 2014/03/28 00:04:11 Done (added a simple TODO).
+ return !PathService::Get(chrome::DIR_USER_DATA, &user_data_dir) ||
+ base::PathExists(user_data_dir.Append(chrome::kFirstRunSentinel));
+}
+
+// static
+bool InstallUtil::GetSentinelFilePath(const base::FilePath::CharType* file,
grt (UTC plus 2) 2014/03/27 15:35:20 this function is now only used to get the path for
msw 2014/03/28 00:04:11 Yup, I'll follow up this CL with similar changes f
+ 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);
« chrome/browser/first_run/first_run_internal_win.cc ('K') | « chrome/installer/util/install_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698