Resurrect battery_status_dispatcher_unittest.
[chromium-blink-merge.git] / chrome / common / switch_utils.cc
blobf765c17c9f72664791d8dd047ffd88d5c2a9757d
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/common/switch_utils.h"
7 #include "base/basictypes.h"
8 #include "chrome/common/chrome_switches.h"
10 namespace switches {
12 // Switches enumerated here will be removed when a background instance of
13 // Chrome restarts itself. If your key is designed to only be used once,
14 // or if it does not make sense when restarting a background instance to
15 // pick up an automatic update, be sure to add it to this list.
16 const char* const kSwitchesToRemoveOnAutorestart[] = {
17 switches::kActivateExistingProfileBrowser,
18 switches::kApp,
19 switches::kAppId,
20 switches::kForceFirstRun,
21 switches::kMakeDefaultBrowser,
22 switches::kNoStartupWindow,
23 switches::kRestoreLastSession,
24 switches::kShowAppList,
25 switches::kWinJumplistAction
28 void RemoveSwitchesForAutostart(
29 std::map<std::string, base::CommandLine::StringType>* switch_list) {
30 for (size_t i = 0; i < arraysize(kSwitchesToRemoveOnAutorestart); ++i)
31 switch_list->erase(kSwitchesToRemoveOnAutorestart[i]);
34 } // namespace switches