disable-signin.patch 1.2 KB

123456789101112131415161718192021222324252627
  1. # Disables browser sign-in
  2. --- a/chrome/browser/ui/chrome_pages.cc
  3. +++ b/chrome/browser/ui/chrome_pages.cc
  4. @@ -494,22 +494,6 @@ GURL GetOSSettingsUrl(const std::string&
  5. #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
  6. void ShowBrowserSignin(Browser* browser,
  7. signin_metrics::AccessPoint access_point) {
  8. - Profile* original_profile = browser->profile()->GetOriginalProfile();
  9. - DCHECK(original_profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed));
  10. -
  11. - // If the browser's profile is an incognito profile, make sure to use
  12. - // a browser window from the original profile. The user cannot sign in
  13. - // from an incognito window.
  14. - auto displayer =
  15. - std::make_unique<ScopedTabbedBrowserDisplayer>(original_profile);
  16. - browser = displayer->browser();
  17. -
  18. - profiles::BubbleViewMode bubble_view_mode =
  19. - IdentityManagerFactory::GetForProfile(original_profile)
  20. - ->HasPrimaryAccount()
  21. - ? profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH
  22. - : profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN;
  23. - browser->signin_view_controller()->ShowSignin(bubble_view_mode, access_point);
  24. }
  25. void ShowBrowserSigninOrSettings(Browser* browser,