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

Unified Diff: chrome/browser/first_run.cc

Issue 12650: The first run sentinel does not get created for system install... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run.cc
===================================================================
--- chrome/browser/first_run.cc (revision 5926)
+++ chrome/browser/first_run.cc (working copy)
@@ -49,9 +49,18 @@
// Gives the full path to the sentinel file. The file might not exist.
bool GetFirstRunSentinelFilePath(std::wstring* path) {
+ std::wstring exe_path;
+ if (!PathService::Get(base::DIR_EXE, &exe_path))
+ return false;
+
std::wstring first_run_sentinel;
- if (!PathService::Get(base::DIR_EXE, &first_run_sentinel))
- return false;
+ if (InstallUtil::IsPerUserInstall(exe_path.c_str())) {
+ first_run_sentinel = exe_path;
+ } else {
+ if (!PathService::Get(chrome::DIR_USER_DATA, &first_run_sentinel))
+ return false;
+ }
+
file_util::AppendToPath(&first_run_sentinel, kSentinelFile);
*path = first_run_sentinel;
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698