OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 }; | 379 }; |
380 #endif // USE_LINUX_BREAKPAD | 380 #endif // USE_LINUX_BREAKPAD |
381 | 381 |
382 void InitializeNetworkOptions(const CommandLine& parsed_command_line) { | 382 void InitializeNetworkOptions(const CommandLine& parsed_command_line) { |
383 if (parsed_command_line.HasSwitch(switches::kEnableFileCookies)) { | 383 if (parsed_command_line.HasSwitch(switches::kEnableFileCookies)) { |
384 // Enable cookie storage for file:// URLs. Must do this before the first | 384 // Enable cookie storage for file:// URLs. Must do this before the first |
385 // Profile (and therefore the first CookieMonster) is created. | 385 // Profile (and therefore the first CookieMonster) is created. |
386 net::CookieMonster::EnableFileScheme(); | 386 net::CookieMonster::EnableFileScheme(); |
387 } | 387 } |
388 | 388 |
389 if (parsed_command_line.HasSwitch(switches::kFixedHttpPort)) { | |
390 net::HttpNetworkSession::set_fixed_http_port(StringToInt( | |
391 parsed_command_line.GetSwitchValueASCII(switches::kFixedHttpPort))); | |
392 } | |
393 | |
394 if (parsed_command_line.HasSwitch(switches::kFixedHttpsPort)) { | |
395 net::HttpNetworkSession::set_fixed_https_port(StringToInt( | |
396 parsed_command_line.GetSwitchValueASCII(switches::kFixedHttpsPort))); | |
397 } | |
398 | |
399 if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors)) | 389 if (parsed_command_line.HasSwitch(switches::kIgnoreCertificateErrors)) |
400 net::HttpNetworkTransaction::IgnoreCertificateErrors(true); | 390 net::HttpNetworkTransaction::IgnoreCertificateErrors(true); |
401 | 391 |
402 if (parsed_command_line.HasSwitch(switches::kHostRules)) | 392 if (parsed_command_line.HasSwitch(switches::kHostRules)) |
403 net::HttpNetworkTransaction::SetHostMappingRules( | 393 net::HttpNetworkTransaction::SetHostMappingRules( |
404 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); | 394 parsed_command_line.GetSwitchValueASCII(switches::kHostRules)); |
405 | 395 |
406 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { | 396 if (parsed_command_line.HasSwitch(switches::kMaxSpdySessionsPerDomain)) { |
407 int value = StringToInt( | 397 int value = StringToInt( |
408 parsed_command_line.GetSwitchValueASCII( | 398 parsed_command_line.GetSwitchValueASCII( |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 | 1294 |
1305 metrics->Stop(); | 1295 metrics->Stop(); |
1306 | 1296 |
1307 // browser_shutdown takes care of deleting browser_process, so we need to | 1297 // browser_shutdown takes care of deleting browser_process, so we need to |
1308 // release it. | 1298 // release it. |
1309 ignore_result(browser_process.release()); | 1299 ignore_result(browser_process.release()); |
1310 browser_shutdown::Shutdown(); | 1300 browser_shutdown::Shutdown(); |
1311 | 1301 |
1312 return result_code; | 1302 return result_code; |
1313 } | 1303 } |
OLD | NEW |