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

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, 5 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 623
624 bool BrowserInit::LaunchWithProfile::Launch( 624 bool BrowserInit::LaunchWithProfile::Launch(
625 Profile* profile, 625 Profile* profile,
626 const std::vector<GURL>& urls_to_open, 626 const std::vector<GURL>& urls_to_open,
627 bool process_startup) { 627 bool process_startup) {
628 DCHECK(profile); 628 DCHECK(profile);
629 profile_ = profile; 629 profile_ = profile;
630 630
631 if (command_line_.HasSwitch(switches::kDnsLogDetails)) 631 if (command_line_.HasSwitch(switches::kDnsLogDetails))
632 chrome_browser_net::EnablePredictorDetailedLog(true); 632 chrome_browser_net::EnablePredictorDetailedLog(true);
633 if (command_line_.HasSwitch(switches::kDnsPrefetchDisable)) 633 if (command_line_.HasSwitch(switches::kDnsPrefetchDisable)) {
634 chrome_browser_net::EnablePredictor(false); 634 if (profile->GetPredictor())
635 profile->GetPredictor()->EnablePredictor(false);
636 }
635 637
636 if (command_line_.HasSwitch(switches::kDumpHistogramsOnExit)) 638 if (command_line_.HasSwitch(switches::kDumpHistogramsOnExit))
637 base::StatisticsRecorder::set_dump_on_exit(true); 639 base::StatisticsRecorder::set_dump_on_exit(true);
638 640
639 if (command_line_.HasSwitch(switches::kRemoteShellPort)) { 641 if (command_line_.HasSwitch(switches::kRemoteShellPort)) {
640 std::string port_str = 642 std::string port_str =
641 command_line_.GetSwitchValueASCII(switches::kRemoteShellPort); 643 command_line_.GetSwitchValueASCII(switches::kRemoteShellPort);
642 int64 port; 644 int64 port;
643 if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535) { 645 if (base::StringToInt64(port_str, &port) && port > 0 && port < 65535) {
644 g_browser_process->InitDevToolsLegacyProtocolHandler( 646 g_browser_process->InitDevToolsLegacyProtocolHandler(
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 return false; 1425 return false;
1424 automation->SetExpectedTabCount(expected_tabs); 1426 automation->SetExpectedTabCount(expected_tabs);
1425 1427
1426 AutomationProviderList* list = 1428 AutomationProviderList* list =
1427 g_browser_process->InitAutomationProviderList(); 1429 g_browser_process->InitAutomationProviderList();
1428 DCHECK(list); 1430 DCHECK(list);
1429 list->AddProvider(automation); 1431 list->AddProvider(automation);
1430 1432
1431 return true; 1433 return true;
1432 } 1434 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698