diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-25 21:18:23 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-25 21:18:23 +0000 |
commit | 0661858a9d898d65f936a02b60919b5b942bd3fa (patch) | |
tree | e466583ededb6a624ded4f19f355877dbb36e4b5 /chrome/browser/first_run.cc | |
parent | f994515ca5432a80f44a5952130c50dd8a533ca3 (diff) | |
download | chromium_src-0661858a9d898d65f936a02b60919b5b942bd3fa.zip chromium_src-0661858a9d898d65f936a02b60919b5b942bd3fa.tar.gz chromium_src-0661858a9d898d65f936a02b60919b5b942bd3fa.tar.bz2 |
The first run sentinel does not get created for system install
- Vista case mostly if user has UAC enabled
- The sentinel path is not writeable if you are not elevated so
first run keeps happening every time.
BUG=1503885
Review URL: http://codereview.chromium.org/12650
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run.cc')
-rwxr-xr-x | chrome/browser/first_run.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc index eb52915..ff046fa 100755 --- a/chrome/browser/first_run.cc +++ b/chrome/browser/first_run.cc @@ -49,9 +49,18 @@ const wchar_t kSentinelFile[] = L"First Run"; // Gives the full path to the sentinel file. The file might not exist. bool GetFirstRunSentinelFilePath(std::wstring* path) { - std::wstring first_run_sentinel; - if (!PathService::Get(base::DIR_EXE, &first_run_sentinel)) + std::wstring exe_path; + if (!PathService::Get(base::DIR_EXE, &exe_path)) return false; + + std::wstring first_run_sentinel; + 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; |