| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/switch_utils.h" | 5 #include "chrome/common/switch_utils.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 | 9 |
| 10 namespace switches { | 10 namespace switches { |
| 11 | 11 |
| 12 // Switches enumerated here will be removed when a background instance of | 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, | 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 | 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. | 15 // pick up an automatic update, be sure to add it to this list. |
| 16 const char* const kSwitchesToRemoveOnAutorestart[] = { | 16 const char* const kSwitchesToRemoveOnAutorestart[] = { |
| 17 switches::kApp, | 17 switches::kApp, |
| 18 switches::kAppId, | 18 switches::kAppId, |
| 19 switches::kForceFirstRun, | 19 switches::kForceFirstRun, |
| 20 switches::kImport, | |
| 21 switches::kImportFromFile, | |
| 22 switches::kMakeDefaultBrowser, | 20 switches::kMakeDefaultBrowser, |
| 23 switches::kNoStartupWindow, | 21 switches::kNoStartupWindow, |
| 24 switches::kRestoreLastSession, | 22 switches::kRestoreLastSession, |
| 25 switches::kShowAppList, | 23 switches::kShowAppList, |
| 26 }; | 24 }; |
| 27 | 25 |
| 28 void RemoveSwitchesForAutostart( | 26 void RemoveSwitchesForAutostart( |
| 29 std::map<std::string, CommandLine::StringType>* switch_list) { | 27 std::map<std::string, CommandLine::StringType>* switch_list) { |
| 30 for (size_t i = 0; i < arraysize(kSwitchesToRemoveOnAutorestart); ++i) | 28 for (size_t i = 0; i < arraysize(kSwitchesToRemoveOnAutorestart); ++i) |
| 31 switch_list->erase(kSwitchesToRemoveOnAutorestart[i]); | 29 switch_list->erase(kSwitchesToRemoveOnAutorestart[i]); |
| 32 } | 30 } |
| 33 | 31 |
| 34 } // namespace switches | 32 } // namespace switches |
| OLD | NEW |