Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1327 if (logging::DialogsAreSuppressed()) | 1327 if (logging::DialogsAreSuppressed()) |
| 1328 command_line->AppendSwitch(switches::kNoErrorDialogs); | 1328 command_line->AppendSwitch(switches::kNoErrorDialogs); |
| 1329 | 1329 |
| 1330 std::string process_type = | 1330 std::string process_type = |
| 1331 command_line->GetSwitchValueASCII(switches::kProcessType); | 1331 command_line->GetSwitchValueASCII(switches::kProcessType); |
| 1332 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 1332 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
| 1333 | 1333 |
| 1334 if (browser_command_line.HasSwitch(switches::kChromeFrame)) | 1334 if (browser_command_line.HasSwitch(switches::kChromeFrame)) |
| 1335 command_line->AppendSwitch(switches::kChromeFrame); | 1335 command_line->AppendSwitch(switches::kChromeFrame); |
| 1336 | 1336 |
| 1337 #if defined(ENABLE_IPC_FUZZER) | |
| 1338 static const char* const kIpcFuzzerSwitches[] = { | |
| 1339 switches::kIpcFuzzerTestcase, | |
| 1340 }; | |
| 1341 command_line->CopySwitchesFrom(browser_command_line, kIpcFuzzerSwitches, | |
| 1342 arraysize(kIpcFuzzerSwitches)); | |
|
jochen (gone - plz use gerrit)
2013/10/31 10:47:00
for just one switch, using a static array seems to
aedla
2013/11/26 17:09:50
I don't like it either. Other callers of CopySwitc
| |
| 1343 #endif | |
| 1344 | |
| 1337 if (process_type == switches::kRendererProcess) { | 1345 if (process_type == switches::kRendererProcess) { |
| 1338 base::FilePath user_data_dir = | 1346 base::FilePath user_data_dir = |
| 1339 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); | 1347 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); |
| 1340 if (!user_data_dir.empty()) | 1348 if (!user_data_dir.empty()) |
| 1341 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); | 1349 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); |
| 1342 #if defined(OS_CHROMEOS) | 1350 #if defined(OS_CHROMEOS) |
| 1343 const std::string& login_profile = | 1351 const std::string& login_profile = |
| 1344 browser_command_line.GetSwitchValueASCII( | 1352 browser_command_line.GetSwitchValueASCII( |
| 1345 chromeos::switches::kLoginProfile); | 1353 chromeos::switches::kLoginProfile); |
| 1346 if (!login_profile.empty()) | 1354 if (!login_profile.empty()) |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2515 #if defined(USE_NSS) | 2523 #if defined(USE_NSS) |
| 2516 crypto::CryptoModuleBlockingPasswordDelegate* | 2524 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2517 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2525 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2518 const GURL& url) { | 2526 const GURL& url) { |
| 2519 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2527 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2520 chrome::kCryptoModulePasswordKeygen, url.host()); | 2528 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2521 } | 2529 } |
| 2522 #endif | 2530 #endif |
| 2523 | 2531 |
| 2524 } // namespace chrome | 2532 } // namespace chrome |
| OLD | NEW |