OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_init.h" | 5 #include "chrome/browser/browser_init.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/event_recorder.h" | 9 #include "base/event_recorder.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 std::max(static_cast<int>(command_line.GetLooseValues().size()), | 799 std::max(static_cast<int>(command_line.GetLooseValues().size()), |
800 0); | 800 0); |
801 if (expected_tabs == 0) | 801 if (expected_tabs == 0) |
802 silent_launch = true; | 802 silent_launch = true; |
803 CreateAutomationProvider<AutomationProvider>(automation_channel_id, | 803 CreateAutomationProvider<AutomationProvider>(automation_channel_id, |
804 profile, expected_tabs); | 804 profile, expected_tabs); |
805 } | 805 } |
806 | 806 |
807 if (command_line.HasSwitch(switches::kUseFlip)) { | 807 if (command_line.HasSwitch(switches::kUseFlip)) { |
808 std::string flip_mode = | 808 std::string flip_mode = |
809 WideToASCII(command_line.GetSwitchValue(switches::kUseFlip)); | 809 WideToASCII(command_line.GetSwitchValue(switches::kUseFlip)); |
810 net::HttpNetworkLayer::EnableFlip(flip_mode); | 810 net::HttpNetworkLayer::EnableFlip(flip_mode); |
811 } | 811 } |
812 | 812 |
813 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { | 813 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { |
814 std::wstring allowed_ports = | 814 std::wstring allowed_ports = |
815 command_line.GetSwitchValue(switches::kExplicitlyAllowedPorts); | 815 command_line.GetSwitchValue(switches::kExplicitlyAllowedPorts); |
816 net::SetExplicitlyAllowedPorts(allowed_ports); | 816 net::SetExplicitlyAllowedPorts(allowed_ports); |
817 } | 817 } |
818 | 818 |
819 // If we don't want to launch a new browser window or tab (in the case | 819 // If we don't want to launch a new browser window or tab (in the case |
(...skipping 12 matching lines...) Expand all Loading... |
832 scoped_refptr<AutomationProviderClass> automation = | 832 scoped_refptr<AutomationProviderClass> automation = |
833 new AutomationProviderClass(profile); | 833 new AutomationProviderClass(profile); |
834 automation->ConnectToChannel(channel_id); | 834 automation->ConnectToChannel(channel_id); |
835 automation->SetExpectedTabCount(expected_tabs); | 835 automation->SetExpectedTabCount(expected_tabs); |
836 | 836 |
837 AutomationProviderList* list = | 837 AutomationProviderList* list = |
838 g_browser_process->InitAutomationProviderList(); | 838 g_browser_process->InitAutomationProviderList(); |
839 DCHECK(list); | 839 DCHECK(list); |
840 list->AddProvider(automation); | 840 list->AddProvider(automation); |
841 } | 841 } |
OLD | NEW |