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

Unified Diff: chrome/installer/util/eula_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: Cleanup. 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
« chrome/installer/setup/install.cc ('K') | « chrome/installer/setup/install.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/eula_util.cc
diff --git a/chrome/installer/util/eula_util.cc b/chrome/installer/util/eula_util.cc
index 9bbf5029810aaa276e7d65fd1bed62d1a5e4ea41..5a139afe70fb3980b412c4a498305408738dff2a 100644
--- a/chrome/installer/util/eula_util.cc
+++ b/chrome/installer/util/eula_util.cc
@@ -6,7 +6,9 @@
#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/installation_state.h"
@@ -18,14 +20,13 @@ namespace installer {
namespace {
-bool IsChromeFirstRunPending(BrowserDistribution* dist) {
+bool IsChromeFirstRunPending() {
// Chrome creates the first run sentinel after the user has gone through the
// first-run flow. Assume Chrome has been run if the path to the sentinel
// cannot be determined.
base::FilePath first_run_sentinel;
grt (UTC plus 2) 2014/03/25 17:37:06 first_run_sentinel -> user_data_dir
- return InstallUtil::GetSentinelFilePath(chrome::kFirstRunSentinel, dist,
- &first_run_sentinel) &&
- !base::PathExists(first_run_sentinel);
+ return PathService::Get(chrome::DIR_USER_DATA, &first_run_sentinel) &&
+ !base::PathExists(first_run_sentinel.Append(chrome::kFirstRunSentinel));
}
bool IsEULAAcceptanceFlagged(BrowserDistribution* dist) {
@@ -88,7 +89,7 @@ EULAAcceptanceResponse IsEULAAccepted(bool system_level) {
if (prod_state.GetEulaAccepted(&eula_accepted) && !eula_accepted)
return QUERY_EULA_NOT_ACCEPTED;
- if (!IsChromeFirstRunPending(dist) || IsEULAAcceptanceFlagged(dist))
+ if (!IsChromeFirstRunPending() || IsEULAAcceptanceFlagged(dist))
return QUERY_EULA_ACCEPTED;
// EULA acceptance not flagged. Now see if it is required.
« chrome/installer/setup/install.cc ('K') | « chrome/installer/setup/install.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698