Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: chrome/browser/browser_main.cc

Issue 3050040: Reland 54771 (and 54795) To enable TCP Preconnection by default... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/preconnect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 1198
1199 // Sets things up so that if we crash from this point on, a dialog will 1199 // Sets things up so that if we crash from this point on, a dialog will
1200 // popup asking the user to restart chrome. It is done this late to avoid 1200 // popup asking the user to restart chrome. It is done this late to avoid
1201 // testing against a bunch of special cases that are taken care early on. 1201 // testing against a bunch of special cases that are taken care early on.
1202 PrepareRestartOnCrashEnviroment(parsed_command_line); 1202 PrepareRestartOnCrashEnviroment(parsed_command_line);
1203 1203
1204 // Initialize and maintain network predictor module, which handles DNS 1204 // Initialize and maintain network predictor module, which handles DNS
1205 // pre-resolution, as well as TCP/IP connection pre-warming. 1205 // pre-resolution, as well as TCP/IP connection pre-warming.
1206 // This also registers an observer to discard data when closing incognito 1206 // This also registers an observer to discard data when closing incognito
1207 // mode. 1207 // mode.
1208 bool preconnect_enabled = true; // Default status (easy to change!).
1209 if (parsed_command_line.HasSwitch(switches::kDisablePreconnect))
1210 preconnect_enabled = false;
1211 else if (parsed_command_line.HasSwitch(switches::kEnablePreconnect))
1212 preconnect_enabled = true;
1208 chrome_browser_net::PredictorInit dns_prefetch( 1213 chrome_browser_net::PredictorInit dns_prefetch(
1209 user_prefs, 1214 user_prefs,
1210 local_state, 1215 local_state,
1211 parsed_command_line.HasSwitch(switches::kEnablePreconnect), 1216 preconnect_enabled,
1212 parsed_command_line.HasSwitch(switches::kPreconnectDespiteProxy)); 1217 parsed_command_line.HasSwitch(switches::kPreconnectDespiteProxy));
1213 1218
1214 #if defined(OS_WIN) 1219 #if defined(OS_WIN)
1215 win_util::ScopedCOMInitializer com_initializer; 1220 win_util::ScopedCOMInitializer com_initializer;
1216 1221
1217 // Init the RLZ library. This just binds the dll and schedules a task on the 1222 // Init the RLZ library. This just binds the dll and schedules a task on the
1218 // file thread to be run sometime later. If this is the first run we record 1223 // file thread to be run sometime later. If this is the first run we record
1219 // the installation event. 1224 // the installation event.
1220 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay); 1225 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay);
1221 #endif 1226 #endif
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 1403
1399 metrics->Stop(); 1404 metrics->Stop();
1400 1405
1401 // browser_shutdown takes care of deleting browser_process, so we need to 1406 // browser_shutdown takes care of deleting browser_process, so we need to
1402 // release it. 1407 // release it.
1403 ignore_result(browser_process.release()); 1408 ignore_result(browser_process.release());
1404 browser_shutdown::Shutdown(); 1409 browser_shutdown::Shutdown();
1405 1410
1406 return result_code; 1411 return result_code;
1407 } 1412 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/preconnect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698