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

Unified Diff: chrome/browser/first_run/first_run.cc

Issue 21150006: Introduce --cancel-first-run and reduce the strength of --no-first-run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: --skip-first-run => --no-first-run Created 7 years, 4 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
« no previous file with comments | « chrome/browser/first_run/first_run.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 70fe2a6af77d288c47ad41201ef5969db56d1e4b..a8fdbd11e8d98c5b53c07ada55c39911c829b547 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -598,9 +598,10 @@ bool IsChromeFirstRun() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kForceFirstRun)) {
internal::first_run_ = internal::FIRST_RUN_TRUE;
- } else if (command_line->HasSwitch(switches::kNoFirstRun)) {
+ } else if (command_line->HasSwitch(switches::kCancelFirstRun)) {
internal::first_run_ = internal::FIRST_RUN_CANCEL;
- } else if (internal::GetFirstRunSentinelFilePath(&first_run_sentinel) &&
+ } else if (!command_line->HasSwitch(switches::kNoFirstRun) &&
+ internal::GetFirstRunSentinelFilePath(&first_run_sentinel) &&
!base::PathExists(first_run_sentinel)) {
internal::first_run_ = internal::FIRST_RUN_TRUE;
}
@@ -608,6 +609,11 @@ bool IsChromeFirstRun() {
return internal::first_run_ == internal::FIRST_RUN_TRUE;
}
+bool IsFirstRunSuppressed(const CommandLine& command_line) {
+ return command_line.HasSwitch(switches::kCancelFirstRun) ||
+ command_line.HasSwitch(switches::kNoFirstRun);
+}
+
void CreateSentinelIfNeeded() {
if (IsChromeFirstRun() ||
internal::first_run_ == internal::FIRST_RUN_CANCEL) {
« no previous file with comments | « chrome/browser/first_run/first_run.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698