OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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. |
| 4 |
| 5 #include "components/network_session_configurator/common/network_switches.h" |
| 6 |
| 7 #include "base/command_line.h" |
| 8 |
| 9 namespace switches { |
| 10 |
| 11 #define NETWORK_SWITCH(name, value) const char name[] = value; |
| 12 #include "components/network_session_configurator/common/network_switch_list.h" |
| 13 #undef NETWORK_SWITCH |
| 14 |
| 15 } // namespace switches |
| 16 |
| 17 namespace network_session_configurator { |
| 18 |
| 19 void CopyNetworkSwitches(const base::CommandLine& src_command_line, |
| 20 base::CommandLine* dest_command_line) { |
| 21 static const char* const kSwitchNames[] = { |
| 22 #define NETWORK_SWITCH(name, value) switches::name, |
| 23 #include "components/network_session_configurator/common/network_switch_list.h" |
| 24 #undef NETWORK_SWITCH |
| 25 }; |
| 26 |
| 27 dest_command_line->CopySwitchesFrom(src_command_line, kSwitchNames, |
| 28 arraysize(kSwitchNames)); |
| 29 } |
| 30 |
| 31 } // namespace network_session_configurator |
OLD | NEW |