| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index 33d1c222b7822cd53a72bf351841c0cd6f044772..0d47e56d373850d2685a002b6f37746b6fe0a53b 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -64,8 +64,6 @@
|
| #include "chrome/browser/search/instant_service_factory.h"
|
| #include "chrome/browser/search/search.h"
|
| #include "chrome/browser/search_engines/search_provider_install_state_message_filter.h"
|
| -#include "chrome/browser/signin/signin_manager.h"
|
| -#include "chrome/browser/signin/signin_manager_factory.h"
|
| #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
|
| #include "chrome/browser/spellchecker/spellcheck_message_filter.h"
|
| #include "chrome/browser/ssl/ssl_add_certificate.h"
|
| @@ -160,6 +158,11 @@
|
| #include "chrome/browser/ui/crypto_module_password_dialog.h"
|
| #endif
|
|
|
| +#if !defined(OS_CHROMEOS)
|
| +#include "chrome/browser/signin/signin_manager.h"
|
| +#include "chrome/browser/signin/signin_manager_factory.h"
|
| +#endif
|
| +
|
| using base::FileDescriptor;
|
| using content::AccessTokenStore;
|
| using content::BrowserChildProcessHostIterator;
|
| @@ -444,6 +447,7 @@ GURL GetEffectiveURLForInstant(const GURL& url, Profile* profile) {
|
| return effective_url;
|
| }
|
|
|
| +#if !defined(OS_CHROMEOS)
|
| GURL GetEffectiveURLForSignin(const GURL& url) {
|
| CHECK(SigninManager::IsWebBasedSigninFlowURL(url));
|
|
|
| @@ -456,6 +460,7 @@ GURL GetEffectiveURLForSignin(const GURL& url) {
|
| effective_url = effective_url.ReplaceComponents(replacements);
|
| return effective_url;
|
| }
|
| +#endif
|
|
|
| } // namespace
|
|
|
| @@ -714,12 +719,14 @@ GURL ChromeContentBrowserClient::GetEffectiveURL(
|
| if (chrome::ShouldAssignURLToInstantRenderer(url, profile))
|
| return GetEffectiveURLForInstant(url, profile);
|
|
|
| +#if !defined(OS_CHROMEOS)
|
| // If the input |url| should be assigned to the Signin renderer, make its
|
| // effective URL distinct from other URLs on the signin service's domain.
|
| // Note that the signin renderer will be allowed to sign the user in to
|
| // Chrome.
|
| if (SigninManager::IsWebBasedSigninFlowURL(url))
|
| return GetEffectiveURLForSignin(url);
|
| +#endif
|
|
|
| // If the input |url| is part of an installed app, the effective URL is an
|
| // extension URL with the ID of that extension as the host. This has the
|
| @@ -758,8 +765,10 @@ bool ChromeContentBrowserClient::ShouldUseProcessPerSite(
|
| if (chrome::ShouldAssignURLToInstantRenderer(effective_url, profile))
|
| return true;
|
|
|
| +#if !defined(OS_CHROMEOS)
|
| if (SigninManager::IsWebBasedSigninFlowURL(effective_url))
|
| return true;
|
| +#endif
|
|
|
| if (!effective_url.SchemeIs(extensions::kExtensionScheme))
|
| return false;
|
| @@ -838,9 +847,11 @@ bool ChromeContentBrowserClient::IsSuitableHost(
|
| instant_service->IsInstantProcess(process_host->GetID()))
|
| return chrome::ShouldAssignURLToInstantRenderer(site_url, profile);
|
|
|
| +#if !defined(OS_CHROMEOS)
|
| SigninManager* signin_manager = SigninManagerFactory::GetForProfile(profile);
|
| if (signin_manager && signin_manager->IsSigninProcess(process_host->GetID()))
|
| return SigninManager::IsWebBasedSigninFlowURL(site_url);
|
| +#endif
|
|
|
| ExtensionService* service =
|
| extensions::ExtensionSystem::Get(profile)->extension_service();
|
| @@ -938,6 +949,7 @@ void ChromeContentBrowserClient::SiteInstanceGotProcess(
|
| instant_service->AddInstantProcess(site_instance->GetProcess()->GetID());
|
| }
|
|
|
| +#if !defined(OS_CHROMEOS)
|
| // We only expect there to be one signin process as we use process-per-site
|
| // for signin URLs. The signin process will be cleared from SigninManager
|
| // when the renderer is destroyed.
|
| @@ -947,6 +959,7 @@ void ChromeContentBrowserClient::SiteInstanceGotProcess(
|
| if (signin_manager)
|
| signin_manager->SetSigninProcess(site_instance->GetProcess()->GetID());
|
| }
|
| +#endif
|
|
|
| ExtensionService* service =
|
| extensions::ExtensionSystem::Get(profile)->extension_service();
|
| @@ -1139,10 +1152,12 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
| instant_service->IsInstantProcess(process->GetID()))
|
| command_line->AppendSwitch(switches::kInstantProcess);
|
|
|
| +#if !defined(OS_CHROMEOS)
|
| SigninManager* signin_manager =
|
| SigninManagerFactory::GetForProfile(profile);
|
| if (signin_manager && signin_manager->IsSigninProcess(process->GetID()))
|
| command_line->AppendSwitch(switches::kSigninProcess);
|
| +#endif
|
| }
|
|
|
| if (content::IsThreadedCompositingEnabled())
|
|
|