| 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_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } else if (parsed_command_line.HasSwitch(switches::kEnableNpn)) { | 271 } else if (parsed_command_line.HasSwitch(switches::kEnableNpn)) { |
| 272 net::HttpStreamFactory::EnableNpnSpdy(); | 272 net::HttpStreamFactory::EnableNpnSpdy(); |
| 273 used_spdy_switch = true; | 273 used_spdy_switch = true; |
| 274 } else if (parsed_command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { | 274 } else if (parsed_command_line.HasSwitch(switches::kEnableNpnHttpOnly)) { |
| 275 net::HttpStreamFactory::EnableNpnHttpOnly(); | 275 net::HttpStreamFactory::EnableNpnHttpOnly(); |
| 276 used_spdy_switch = true; | 276 used_spdy_switch = true; |
| 277 } | 277 } |
| 278 if (!used_spdy_switch) { | 278 if (!used_spdy_switch) { |
| 279 net::HttpStreamFactory::EnableNpnSpdy3(); | 279 net::HttpStreamFactory::EnableNpnSpdy3(); |
| 280 } | 280 } |
| 281 |
| 282 if (parsed_command_line.HasSwitch(switches::kForceQuicPort)) { |
| 283 std::string quic_port = |
| 284 parsed_command_line.GetSwitchValueASCII(switches::kForceQuicPort); |
| 285 net::HttpNetworkLayer::EnableQuic(quic_port); |
| 286 } |
| 281 } | 287 } |
| 282 | 288 |
| 283 // Returns the new local state object, guaranteed non-NULL. | 289 // Returns the new local state object, guaranteed non-NULL. |
| 284 // |local_state_task_runner| must be a shutdown-blocking task runner. | 290 // |local_state_task_runner| must be a shutdown-blocking task runner. |
| 285 PrefService* InitializeLocalState( | 291 PrefService* InitializeLocalState( |
| 286 base::SequencedTaskRunner* local_state_task_runner, | 292 base::SequencedTaskRunner* local_state_task_runner, |
| 287 const CommandLine& parsed_command_line, | 293 const CommandLine& parsed_command_line, |
| 288 bool is_first_run) { | 294 bool is_first_run) { |
| 289 FilePath local_state_path; | 295 FilePath local_state_path; |
| 290 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); | 296 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); |
| (...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1727 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1733 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1728 uma_name += "_XP"; | 1734 uma_name += "_XP"; |
| 1729 | 1735 |
| 1730 uma_name += "_PreRead_"; | 1736 uma_name += "_PreRead_"; |
| 1731 uma_name += pre_read_percentage; | 1737 uma_name += pre_read_percentage; |
| 1732 AddPreReadHistogramTime(uma_name.c_str(), time); | 1738 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1733 } | 1739 } |
| 1734 #endif | 1740 #endif |
| 1735 #endif | 1741 #endif |
| 1736 } | 1742 } |
| OLD | NEW |