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

Side by Side Diff: chrome/browser/ui/browser_init.cc

Issue 7467012: Modifying prefetch to account for multi-profile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Modifying prefetch to account for multi-profile. Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/browser_init.h" 5 #include "chrome/browser/ui/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 13 matching lines...) Expand all
24 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/component_updater/component_updater_service.h" 25 #include "chrome/browser/component_updater/component_updater_service.h"
26 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" 26 #include "chrome/browser/component_updater/pepper_flash_component_installer.h"
27 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 27 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
28 #include "chrome/browser/defaults.h" 28 #include "chrome/browser/defaults.h"
29 #include "chrome/browser/extensions/extension_creator.h" 29 #include "chrome/browser/extensions/extension_creator.h"
30 #include "chrome/browser/extensions/extension_service.h" 30 #include "chrome/browser/extensions/extension_service.h"
31 #include "chrome/browser/extensions/pack_extension_job.h" 31 #include "chrome/browser/extensions/pack_extension_job.h"
32 #include "chrome/browser/first_run/first_run.h" 32 #include "chrome/browser/first_run/first_run.h"
33 #include "chrome/browser/infobars/infobar_tab_helper.h" 33 #include "chrome/browser/infobars/infobar_tab_helper.h"
34 #include "chrome/browser/net/predictor_api.h" 34 #include "chrome/browser/net/predictor.h"
35 #include "chrome/browser/net/url_fixer_upper.h" 35 #include "chrome/browser/net/url_fixer_upper.h"
36 #include "chrome/browser/notifications/desktop_notification_service.h" 36 #include "chrome/browser/notifications/desktop_notification_service.h"
37 #include "chrome/browser/prefs/incognito_mode_prefs.h" 37 #include "chrome/browser/prefs/incognito_mode_prefs.h"
38 #include "chrome/browser/prefs/pref_service.h" 38 #include "chrome/browser/prefs/pref_service.h"
39 #include "chrome/browser/prefs/session_startup_pref.h" 39 #include "chrome/browser/prefs/session_startup_pref.h"
40 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 40 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
41 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 41 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
42 #include "chrome/browser/printing/print_dialog_cloud.h" 42 #include "chrome/browser/printing/print_dialog_cloud.h"
43 #include "chrome/browser/profiles/profile.h" 43 #include "chrome/browser/profiles/profile.h"
44 #include "chrome/browser/profiles/profile_io_data.h" 44 #include "chrome/browser/profiles/profile_io_data.h"
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 661
662 bool BrowserInit::LaunchWithProfile::Launch( 662 bool BrowserInit::LaunchWithProfile::Launch(
663 Profile* profile, 663 Profile* profile,
664 const std::vector<GURL>& urls_to_open, 664 const std::vector<GURL>& urls_to_open,
665 bool process_startup) { 665 bool process_startup) {
666 DCHECK(profile); 666 DCHECK(profile);
667 profile_ = profile; 667 profile_ = profile;
668 668
669 if (command_line_.HasSwitch(switches::kDnsLogDetails)) 669 if (command_line_.HasSwitch(switches::kDnsLogDetails))
670 chrome_browser_net::EnablePredictorDetailedLog(true); 670 chrome_browser_net::EnablePredictorDetailedLog(true);
671 if (command_line_.HasSwitch(switches::kDnsPrefetchDisable)) 671 if (command_line_.HasSwitch(switches::kDnsPrefetchDisable) &&
672 chrome_browser_net::EnablePredictor(false); 672 profile->GetNetworkPredictor()) {
673 profile->GetNetworkPredictor()->EnablePredictor(false);
674 }
673 675
674 if (command_line_.HasSwitch(switches::kDumpHistogramsOnExit)) 676 if (command_line_.HasSwitch(switches::kDumpHistogramsOnExit))
675 base::StatisticsRecorder::set_dump_on_exit(true); 677 base::StatisticsRecorder::set_dump_on_exit(true);
676 678
677 if (command_line_.HasSwitch(switches::kRemoteShellPort)) { 679 if (command_line_.HasSwitch(switches::kRemoteShellPort)) {
678 std::string port_str = 680 std::string port_str =
679 command_line_.GetSwitchValueASCII(switches::kRemoteShellPort); 681 command_line_.GetSwitchValueASCII(switches::kRemoteShellPort);
680 int64 port; 682 int64 port;
681 if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535) { 683 if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535) {
682 g_browser_process->InitDevToolsLegacyProtocolHandler( 684 g_browser_process->InitDevToolsLegacyProtocolHandler(
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 return false; 1505 return false;
1504 automation->SetExpectedTabCount(expected_tabs); 1506 automation->SetExpectedTabCount(expected_tabs);
1505 1507
1506 AutomationProviderList* list = 1508 AutomationProviderList* list =
1507 g_browser_process->InitAutomationProviderList(); 1509 g_browser_process->InitAutomationProviderList();
1508 DCHECK(list); 1510 DCHECK(list);
1509 list->AddProvider(automation); 1511 list->AddProvider(automation);
1510 1512
1511 return true; 1513 return true;
1512 } 1514 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698