From 8807162a05ecd0c6d6c4659047b1763058cad3c3 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Fri, 9 Oct 2009 20:43:51 +0000 Subject: linux/mac: use "First Run", not "First Run Dev" This should've been done back when we finished the First Run dialogs, but better late than never. BUG=24397 TEST=Run Chrome on an old profile; you should not get a first run dialog if you've already clicked through and your user data dir should now contain a "First Run" file and no "First Run Dev" file. Run Chrome on a new profile; First Run should still work as before. Review URL: http://codereview.chromium.org/273009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28592 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/first_run.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'chrome/browser/first_run.cc') diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc index 67069ba..a49276f 100644 --- a/chrome/browser/first_run.cc +++ b/chrome/browser/first_run.cc @@ -21,14 +21,7 @@ namespace { // The kSentinelFile file absence will tell us it is a first run. -#if defined(OS_WIN) const char kSentinelFile[] = "First Run"; -#else -// On other platforms de intentionally use a different file name, so -// when the remainder of this file is implemented, we can switch to -// the proper file name and users will get the first run interface again. -const char kSentinelFile[] = "First Run Dev"; -#endif // Gives the full path to the sentinel file. The file might not exist. bool GetFirstRunSentinelFilePath(FilePath* path) { @@ -45,12 +38,18 @@ bool GetFirstRunSentinelFilePath(FilePath* path) { return false; } #else - // TODO(port): logic as above. Not important for our "First Run Dev" file. if (!PathService::Get(chrome::DIR_USER_DATA, &first_run_sentinel)) return false; #endif + // TODO(evanm): remove this old_sentinel business once users are migrated. + // http://code.google.com/p/chromium/issues/detail?id=24450 + FilePath old_sentinel = first_run_sentinel.AppendASCII("First Run Dev"); first_run_sentinel = first_run_sentinel.AppendASCII(kSentinelFile); + + if (file_util::PathExists(old_sentinel)) + file_util::Move(old_sentinel, first_run_sentinel); + *path = first_run_sentinel; return true; } -- cgit v1.1