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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 192 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
193 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 193 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
194 #endif | 194 #endif |
195 | 195 |
196 #if defined(OS_ANDROID) | 196 #if defined(OS_ANDROID) |
197 #include "ui/base/ui_base_paths.h" | 197 #include "ui/base/ui_base_paths.h" |
198 #include "ui/gfx/android/device_display_info.h" | 198 #include "ui/gfx/android/device_display_info.h" |
199 #endif | 199 #endif |
200 | 200 |
201 #if !defined(OS_CHROMEOS) | 201 #if !defined(OS_CHROMEOS) |
| 202 #include "chrome/browser/signin/chrome_signin_client.h" |
| 203 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
202 #include "chrome/browser/signin/signin_manager.h" | 204 #include "chrome/browser/signin/signin_manager.h" |
203 #include "chrome/browser/signin/signin_manager_factory.h" | 205 #include "chrome/browser/signin/signin_manager_factory.h" |
204 #endif | 206 #endif |
205 | 207 |
206 #if !defined(OS_ANDROID) | 208 #if !defined(OS_ANDROID) |
207 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 209 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
208 #endif | 210 #endif |
209 | 211 |
210 #if defined(ENABLE_WEBRTC) | 212 #if defined(ENABLE_WEBRTC) |
211 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 213 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 if (instant_service) { | 1175 if (instant_service) { |
1174 bool is_instant_process = instant_service->IsInstantProcess( | 1176 bool is_instant_process = instant_service->IsInstantProcess( |
1175 process_host->GetID()); | 1177 process_host->GetID()); |
1176 bool should_be_in_instant_process = | 1178 bool should_be_in_instant_process = |
1177 chrome::ShouldAssignURLToInstantRenderer(site_url, profile); | 1179 chrome::ShouldAssignURLToInstantRenderer(site_url, profile); |
1178 if (is_instant_process || should_be_in_instant_process) | 1180 if (is_instant_process || should_be_in_instant_process) |
1179 return is_instant_process && should_be_in_instant_process; | 1181 return is_instant_process && should_be_in_instant_process; |
1180 } | 1182 } |
1181 | 1183 |
1182 #if !defined(OS_CHROMEOS) | 1184 #if !defined(OS_CHROMEOS) |
1183 SigninManager* signin_manager = SigninManagerFactory::GetForProfile(profile); | 1185 ChromeSigninClient* signin_client = |
1184 if (signin_manager && signin_manager->IsSigninProcess(process_host->GetID())) | 1186 ChromeSigninClientFactory::GetForProfile(profile); |
| 1187 if (signin_client && signin_client->IsSigninProcess(process_host->GetID())) |
1185 return SigninManager::IsWebBasedSigninFlowURL(site_url); | 1188 return SigninManager::IsWebBasedSigninFlowURL(site_url); |
1186 #endif | 1189 #endif |
1187 | 1190 |
1188 ExtensionService* service = | 1191 ExtensionService* service = |
1189 extensions::ExtensionSystem::Get(profile)->extension_service(); | 1192 extensions::ExtensionSystem::Get(profile)->extension_service(); |
1190 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); | 1193 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); |
1191 | 1194 |
1192 // Don't allow the Task Manager to share a process with anything else. | 1195 // Don't allow the Task Manager to share a process with anything else. |
1193 // Otherwise it can affect the renderers it is observing. | 1196 // Otherwise it can affect the renderers it is observing. |
1194 // Note: we could create another RenderProcessHostPrivilege bucket for | 1197 // Note: we could create another RenderProcessHostPrivilege bucket for |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 InstantServiceFactory::GetForProfile(profile); | 1282 InstantServiceFactory::GetForProfile(profile); |
1280 if (instant_service) | 1283 if (instant_service) |
1281 instant_service->AddInstantProcess(site_instance->GetProcess()->GetID()); | 1284 instant_service->AddInstantProcess(site_instance->GetProcess()->GetID()); |
1282 } | 1285 } |
1283 | 1286 |
1284 #if !defined(OS_CHROMEOS) | 1287 #if !defined(OS_CHROMEOS) |
1285 // We only expect there to be one signin process as we use process-per-site | 1288 // We only expect there to be one signin process as we use process-per-site |
1286 // for signin URLs. The signin process will be cleared from SigninManager | 1289 // for signin URLs. The signin process will be cleared from SigninManager |
1287 // when the renderer is destroyed. | 1290 // when the renderer is destroyed. |
1288 if (SigninManager::IsWebBasedSigninFlowURL(site_instance->GetSiteURL())) { | 1291 if (SigninManager::IsWebBasedSigninFlowURL(site_instance->GetSiteURL())) { |
1289 SigninManager* signin_manager = | 1292 ChromeSigninClient* signin_client = |
1290 SigninManagerFactory::GetForProfile(profile); | 1293 ChromeSigninClientFactory::GetForProfile(profile); |
1291 if (signin_manager) | 1294 if (signin_client) |
1292 signin_manager->SetSigninProcess(site_instance->GetProcess()->GetID()); | 1295 signin_client->SetSigninProcess(site_instance->GetProcess()->GetID()); |
1293 BrowserThread::PostTask( | 1296 BrowserThread::PostTask( |
1294 BrowserThread::IO, | 1297 BrowserThread::IO, |
1295 FROM_HERE, | 1298 FROM_HERE, |
1296 base::Bind(&InfoMap::SetSigninProcess, | 1299 base::Bind(&InfoMap::SetSigninProcess, |
1297 extensions::ExtensionSystem::Get(profile)->info_map(), | 1300 extensions::ExtensionSystem::Get(profile)->info_map(), |
1298 site_instance->GetProcess()->GetID())); | 1301 site_instance->GetProcess()->GetID())); |
1299 } | 1302 } |
1300 #endif | 1303 #endif |
1301 | 1304 |
1302 ExtensionService* service = | 1305 ExtensionService* service = |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 if (!prefs->GetBoolean(prefs::kPrintPreviewDisabled)) | 1537 if (!prefs->GetBoolean(prefs::kPrintPreviewDisabled)) |
1535 command_line->AppendSwitch(switches::kRendererPrintPreview); | 1538 command_line->AppendSwitch(switches::kRendererPrintPreview); |
1536 | 1539 |
1537 InstantService* instant_service = | 1540 InstantService* instant_service = |
1538 InstantServiceFactory::GetForProfile(profile); | 1541 InstantServiceFactory::GetForProfile(profile); |
1539 if (instant_service && | 1542 if (instant_service && |
1540 instant_service->IsInstantProcess(process->GetID())) | 1543 instant_service->IsInstantProcess(process->GetID())) |
1541 command_line->AppendSwitch(switches::kInstantProcess); | 1544 command_line->AppendSwitch(switches::kInstantProcess); |
1542 | 1545 |
1543 #if !defined(OS_CHROMEOS) | 1546 #if !defined(OS_CHROMEOS) |
1544 SigninManager* signin_manager = | 1547 ChromeSigninClient* signin_client = |
1545 SigninManagerFactory::GetForProfile(profile); | 1548 ChromeSigninClientFactory::GetForProfile(profile); |
1546 if (signin_manager && signin_manager->IsSigninProcess(process->GetID())) | 1549 if (signin_client && signin_client->IsSigninProcess(process->GetID())) |
1547 command_line->AppendSwitch(switches::kSigninProcess); | 1550 command_line->AppendSwitch(switches::kSigninProcess); |
1548 #endif | 1551 #endif |
1549 } | 1552 } |
1550 | 1553 |
1551 // Please keep this in alphabetical order. | 1554 // Please keep this in alphabetical order. |
1552 static const char* const kSwitchNames[] = { | 1555 static const char* const kSwitchNames[] = { |
1553 autofill::switches::kDisableIgnoreAutocompleteOff, | 1556 autofill::switches::kDisableIgnoreAutocompleteOff, |
1554 autofill::switches::kDisableInteractiveAutocomplete, | 1557 autofill::switches::kDisableInteractiveAutocomplete, |
1555 autofill::switches::kDisablePasswordGeneration, | 1558 autofill::switches::kDisablePasswordGeneration, |
1556 autofill::switches::kEnableInteractiveAutocomplete, | 1559 autofill::switches::kEnableInteractiveAutocomplete, |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2735 switches::kDisableWebRtcEncryption, | 2738 switches::kDisableWebRtcEncryption, |
2736 }; | 2739 }; |
2737 to_command_line->CopySwitchesFrom(from_command_line, | 2740 to_command_line->CopySwitchesFrom(from_command_line, |
2738 kWebRtcDevSwitchNames, | 2741 kWebRtcDevSwitchNames, |
2739 arraysize(kWebRtcDevSwitchNames)); | 2742 arraysize(kWebRtcDevSwitchNames)); |
2740 } | 2743 } |
2741 } | 2744 } |
2742 #endif // defined(ENABLE_WEBRTC) | 2745 #endif // defined(ENABLE_WEBRTC) |
2743 | 2746 |
2744 } // namespace chrome | 2747 } // namespace chrome |
OLD | NEW |