OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1178 if (instant_service) { | 1178 if (instant_service) { |
1179 bool is_instant_process = instant_service->IsInstantProcess( | 1179 bool is_instant_process = instant_service->IsInstantProcess( |
1180 process_host->GetID()); | 1180 process_host->GetID()); |
1181 bool should_be_in_instant_process = | 1181 bool should_be_in_instant_process = |
1182 chrome::ShouldAssignURLToInstantRenderer(site_url, profile); | 1182 chrome::ShouldAssignURLToInstantRenderer(site_url, profile); |
1183 if (is_instant_process || should_be_in_instant_process) | 1183 if (is_instant_process || should_be_in_instant_process) |
1184 return is_instant_process && should_be_in_instant_process; | 1184 return is_instant_process && should_be_in_instant_process; |
1185 } | 1185 } |
1186 | 1186 |
1187 #if !defined(OS_CHROMEOS) | 1187 #if !defined(OS_CHROMEOS) |
1188 ChromeSigninClient* signin_client = | 1188 SigninClient* signin_client = |
1189 ChromeSigninClientFactory::GetForProfile(profile); | 1189 ChromeSigninClientFactory::GetForProfile(profile); |
1190 if (signin_client && signin_client->IsSigninProcess(process_host->GetID())) | 1190 if (signin_client && signin_client->IsSigninProcess(process_host->GetID())) |
1191 return SigninManager::IsWebBasedSigninFlowURL(site_url); | 1191 return SigninManager::IsWebBasedSigninFlowURL(site_url); |
1192 #endif | 1192 #endif |
1193 | 1193 |
1194 ExtensionService* service = | 1194 ExtensionService* service = |
1195 extensions::ExtensionSystem::Get(profile)->extension_service(); | 1195 extensions::ExtensionSystem::Get(profile)->extension_service(); |
1196 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); | 1196 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); |
1197 | 1197 |
1198 // Don't allow the Task Manager to share a process with anything else. | 1198 // Don't allow the Task Manager to share a process with anything else. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 InstantServiceFactory::GetForProfile(profile); | 1303 InstantServiceFactory::GetForProfile(profile); |
1304 if (instant_service) | 1304 if (instant_service) |
1305 instant_service->AddInstantProcess(site_instance->GetProcess()->GetID()); | 1305 instant_service->AddInstantProcess(site_instance->GetProcess()->GetID()); |
1306 } | 1306 } |
1307 | 1307 |
1308 #if !defined(OS_CHROMEOS) | 1308 #if !defined(OS_CHROMEOS) |
1309 // We only expect there to be one signin process as we use process-per-site | 1309 // We only expect there to be one signin process as we use process-per-site |
1310 // for signin URLs. The signin process will be cleared from SigninManager | 1310 // for signin URLs. The signin process will be cleared from SigninManager |
1311 // when the renderer is destroyed. | 1311 // when the renderer is destroyed. |
1312 if (SigninManager::IsWebBasedSigninFlowURL(site_instance->GetSiteURL())) { | 1312 if (SigninManager::IsWebBasedSigninFlowURL(site_instance->GetSiteURL())) { |
1313 ChromeSigninClient* signin_client = | 1313 SigninClient* signin_client = |
1314 ChromeSigninClientFactory::GetForProfile(profile); | 1314 ChromeSigninClientFactory::GetForProfile(profile); |
1315 if (signin_client) | 1315 if (signin_client) |
1316 signin_client->SetSigninProcess(site_instance->GetProcess()->GetID()); | 1316 signin_client->SetSigninProcess(site_instance->GetProcess()->GetID()); |
1317 BrowserThread::PostTask( | 1317 BrowserThread::PostTask( |
1318 BrowserThread::IO, | 1318 BrowserThread::IO, |
1319 FROM_HERE, | 1319 FROM_HERE, |
1320 base::Bind(&InfoMap::SetSigninProcess, | 1320 base::Bind(&InfoMap::SetSigninProcess, |
1321 extensions::ExtensionSystem::Get(profile)->info_map(), | 1321 extensions::ExtensionSystem::Get(profile)->info_map(), |
1322 site_instance->GetProcess()->GetID())); | 1322 site_instance->GetProcess()->GetID())); |
1323 } | 1323 } |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1558 if (!prefs->GetBoolean(prefs::kPrintPreviewDisabled)) | 1558 if (!prefs->GetBoolean(prefs::kPrintPreviewDisabled)) |
1559 command_line->AppendSwitch(switches::kRendererPrintPreview); | 1559 command_line->AppendSwitch(switches::kRendererPrintPreview); |
1560 | 1560 |
1561 InstantService* instant_service = | 1561 InstantService* instant_service = |
1562 InstantServiceFactory::GetForProfile(profile); | 1562 InstantServiceFactory::GetForProfile(profile); |
1563 if (instant_service && | 1563 if (instant_service && |
1564 instant_service->IsInstantProcess(process->GetID())) | 1564 instant_service->IsInstantProcess(process->GetID())) |
1565 command_line->AppendSwitch(switches::kInstantProcess); | 1565 command_line->AppendSwitch(switches::kInstantProcess); |
1566 | 1566 |
1567 #if !defined(OS_CHROMEOS) | 1567 #if !defined(OS_CHROMEOS) |
1568 ChromeSigninClient* signin_client = | 1568 SigninClient* signin_client = |
1569 ChromeSigninClientFactory::GetForProfile(profile); | 1569 ChromeSigninClientFactory::GetForProfile(profile); |
1570 if (signin_client && signin_client->IsSigninProcess(process->GetID())) | 1570 if (signin_client && signin_client->IsSigninProcess(process->GetID())) |
1571 command_line->AppendSwitch(switches::kSigninProcess); | 1571 command_line->AppendSwitch(switches::kSigninProcess); |
1572 #endif | 1572 #endif |
1573 } | 1573 } |
1574 | 1574 |
1575 { | 1575 { |
1576 // Enable auto-reload if this session is in the field trial or the user | 1576 // Enable auto-reload if this session is in the field trial or the user |
1577 // explicitly enabled it. | 1577 // explicitly enabled it. |
1578 bool hard_enabled = | 1578 bool hard_enabled = |
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2752 switches::kDisableWebRtcEncryption, | 2752 switches::kDisableWebRtcEncryption, |
2753 }; | 2753 }; |
2754 to_command_line->CopySwitchesFrom(from_command_line, | 2754 to_command_line->CopySwitchesFrom(from_command_line, |
2755 kWebRtcDevSwitchNames, | 2755 kWebRtcDevSwitchNames, |
2756 arraysize(kWebRtcDevSwitchNames)); | 2756 arraysize(kWebRtcDevSwitchNames)); |
2757 } | 2757 } |
2758 } | 2758 } |
2759 #endif // defined(ENABLE_WEBRTC) | 2759 #endif // defined(ENABLE_WEBRTC) |
2760 | 2760 |
2761 } // namespace chrome | 2761 } // namespace chrome |
OLD | NEW |