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

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: '' Created 9 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
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 10 matching lines...) Expand all
21 #include "chrome/browser/automation/automation_provider_list.h" 21 #include "chrome/browser/automation/automation_provider_list.h"
22 #include "chrome/browser/automation/chrome_frame_automation_provider.h" 22 #include "chrome/browser/automation/chrome_frame_automation_provider.h"
23 #include "chrome/browser/automation/testing_automation_provider.h" 23 #include "chrome/browser/automation/testing_automation_provider.h"
24 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/defaults.h" 25 #include "chrome/browser/defaults.h"
26 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 26 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
27 #include "chrome/browser/extensions/extension_creator.h" 27 #include "chrome/browser/extensions/extension_creator.h"
28 #include "chrome/browser/extensions/extension_service.h" 28 #include "chrome/browser/extensions/extension_service.h"
29 #include "chrome/browser/extensions/pack_extension_job.h" 29 #include "chrome/browser/extensions/pack_extension_job.h"
30 #include "chrome/browser/first_run/first_run.h" 30 #include "chrome/browser/first_run/first_run.h"
31 #include "chrome/browser/net/predictor_api.h" 31 #include "chrome/browser/net/predictor.h"
32 #include "chrome/browser/net/url_fixer_upper.h" 32 #include "chrome/browser/net/url_fixer_upper.h"
33 #include "chrome/browser/notifications/desktop_notification_service.h" 33 #include "chrome/browser/notifications/desktop_notification_service.h"
34 #include "chrome/browser/prefs/incognito_mode_prefs.h" 34 #include "chrome/browser/prefs/incognito_mode_prefs.h"
35 #include "chrome/browser/prefs/pref_service.h" 35 #include "chrome/browser/prefs/pref_service.h"
36 #include "chrome/browser/prefs/session_startup_pref.h" 36 #include "chrome/browser/prefs/session_startup_pref.h"
37 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 37 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
38 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 38 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
39 #include "chrome/browser/printing/print_dialog_cloud.h" 39 #include "chrome/browser/printing/print_dialog_cloud.h"
40 #include "chrome/browser/profiles/profile.h" 40 #include "chrome/browser/profiles/profile.h"
41 #include "chrome/browser/profiles/profile_io_data.h" 41 #include "chrome/browser/profiles/profile_io_data.h"
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 bool BrowserInit::LaunchWithProfile::Launch( 644 bool BrowserInit::LaunchWithProfile::Launch(
645 Profile* profile, 645 Profile* profile,
646 const std::vector<GURL>& urls_to_open, 646 const std::vector<GURL>& urls_to_open,
647 bool process_startup) { 647 bool process_startup) {
648 DCHECK(profile); 648 DCHECK(profile);
649 profile_ = profile; 649 profile_ = profile;
650 650
651 if (command_line_.HasSwitch(switches::kDnsLogDetails)) 651 if (command_line_.HasSwitch(switches::kDnsLogDetails))
652 chrome_browser_net::EnablePredictorDetailedLog(true); 652 chrome_browser_net::EnablePredictorDetailedLog(true);
653 if (command_line_.HasSwitch(switches::kDnsPrefetchDisable)) 653 if (command_line_.HasSwitch(switches::kDnsPrefetchDisable)) {
654 chrome_browser_net::EnablePredictor(false); 654 if (profile->GetNetworkPredictor())
655 profile->GetNetworkPredictor()->EnablePredictor(false);
656 }
655 657
656 if (command_line_.HasSwitch(switches::kDumpHistogramsOnExit)) 658 if (command_line_.HasSwitch(switches::kDumpHistogramsOnExit))
657 base::StatisticsRecorder::set_dump_on_exit(true); 659 base::StatisticsRecorder::set_dump_on_exit(true);
658 660
659 if (command_line_.HasSwitch(switches::kRemoteShellPort)) { 661 if (command_line_.HasSwitch(switches::kRemoteShellPort)) {
660 std::string port_str = 662 std::string port_str =
661 command_line_.GetSwitchValueASCII(switches::kRemoteShellPort); 663 command_line_.GetSwitchValueASCII(switches::kRemoteShellPort);
662 int64 port; 664 int64 port;
663 if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535) { 665 if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535) {
664 g_browser_process->InitDevToolsLegacyProtocolHandler( 666 g_browser_process->InitDevToolsLegacyProtocolHandler(
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 return false; 1451 return false;
1450 automation->SetExpectedTabCount(expected_tabs); 1452 automation->SetExpectedTabCount(expected_tabs);
1451 1453
1452 AutomationProviderList* list = 1454 AutomationProviderList* list =
1453 g_browser_process->InitAutomationProviderList(); 1455 g_browser_process->InitAutomationProviderList();
1454 DCHECK(list); 1456 DCHECK(list);
1455 list->AddProvider(automation); 1457 list->AddProvider(automation);
1456 1458
1457 return true; 1459 return true;
1458 } 1460 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698