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

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

Issue 3071022: 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 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 1192
1193 // Sets things up so that if we crash from this point on, a dialog will 1193 // Sets things up so that if we crash from this point on, a dialog will
1194 // popup asking the user to restart chrome. It is done this late to avoid 1194 // popup asking the user to restart chrome. It is done this late to avoid
1195 // testing against a bunch of special cases that are taken care early on. 1195 // testing against a bunch of special cases that are taken care early on.
1196 PrepareRestartOnCrashEnviroment(parsed_command_line); 1196 PrepareRestartOnCrashEnviroment(parsed_command_line);
1197 1197
1198 // Initialize and maintain network predictor module, which handles DNS 1198 // Initialize and maintain network predictor module, which handles DNS
1199 // pre-resolution, as well as TCP/IP connection pre-warming. 1199 // pre-resolution, as well as TCP/IP connection pre-warming.
1200 // This also registers an observer to discard data when closing incognito 1200 // This also registers an observer to discard data when closing incognito
1201 // mode. 1201 // mode.
1202 bool preconnect_enabled = true; // Default status (easy to change!).
1203 if (parsed_command_line.HasSwitch(switches::kDisablePreconnect))
1204 preconnect_enabled = false;
1205 else if (parsed_command_line.HasSwitch(switches::kEnablePreconnect))
1206 preconnect_enabled = true;
1202 chrome_browser_net::PredictorInit dns_prefetch( 1207 chrome_browser_net::PredictorInit dns_prefetch(
1203 user_prefs, 1208 user_prefs,
1204 local_state, 1209 local_state,
1205 parsed_command_line.HasSwitch(switches::kEnablePreconnect), 1210 preconnect_enabled,
1206 parsed_command_line.HasSwitch(switches::kPreconnectDespiteProxy)); 1211 parsed_command_line.HasSwitch(switches::kPreconnectDespiteProxy));
1207 1212
1208 #if defined(OS_WIN) 1213 #if defined(OS_WIN)
1209 win_util::ScopedCOMInitializer com_initializer; 1214 win_util::ScopedCOMInitializer com_initializer;
1210 1215
1211 // Init the RLZ library. This just binds the dll and schedules a task on the 1216 // Init the RLZ library. This just binds the dll and schedules a task on the
1212 // file thread to be run sometime later. If this is the first run we record 1217 // file thread to be run sometime later. If this is the first run we record
1213 // the installation event. 1218 // the installation event.
1214 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay); 1219 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay);
1215 #endif 1220 #endif
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 1397
1393 metrics->Stop(); 1398 metrics->Stop();
1394 1399
1395 // browser_shutdown takes care of deleting browser_process, so we need to 1400 // browser_shutdown takes care of deleting browser_process, so we need to
1396 // release it. 1401 // release it.
1397 ignore_result(browser_process.release()); 1402 ignore_result(browser_process.release());
1398 browser_shutdown::Shutdown(); 1403 browser_shutdown::Shutdown();
1399 1404
1400 return result_code; 1405 return result_code;
1401 } 1406 }
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