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

Unified Diff: chrome/common/switch_utils.cc

Issue 3307024: Remove one-time flags when restarting after update.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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/common/switch_utils.h ('k') | chrome/common/switch_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/switch_utils.cc
===================================================================
--- chrome/common/switch_utils.cc (revision 0)
+++ chrome/common/switch_utils.cc (revision 0)
@@ -0,0 +1,29 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/switch_utils.h"
+
+#include "chrome/common/chrome_switches.h"
+
+namespace switches {
+
+// Switches enumerated here will be removed when a background instance of
+// Chrome restarts itself. If your key is designed to only be used once,
+// or if it does not make sense when restarting a background instance to
+// pick up an automatic update, be sure to add it to this list.
+const char* const kSwitchesToRemoveOnAutorestart[] = {
+ switches::kApp,
+ switches::kFirstRun,
+ switches::kImport,
+ switches::kImportFromFile,
+ switches::kMakeDefaultBrowser
+};
+
+void RemoveSwitchesForAutostart(
+ std::map<std::string, CommandLine::StringType>* switch_list) {
+ for (size_t i = 0; i < arraysize(kSwitchesToRemoveOnAutorestart); ++i)
+ switch_list->erase(kSwitchesToRemoveOnAutorestart[i]);
+}
+
+} // namespace switches
Property changes on: chrome\common\switch_utils.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/common/switch_utils.h ('k') | chrome/common/switch_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698