0008-restore-classic-ntp.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --- a/chrome/browser/search/search.cc
  2. +++ b/chrome/browser/search/search.cc
  3. @@ -179,33 +179,8 @@ struct NewTabURLDetails {
  4. const GURL local_url(default_is_google
  5. ? chrome::kChromeUINewTabPageURL
  6. : chrome::kChromeUINewTabPageThirdPartyURL);
  7. - if (default_is_google) {
  8. - return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
  9. - }
  10. #endif
  11. -
  12. - const TemplateURL* template_url =
  13. - GetDefaultSearchProviderTemplateURL(profile);
  14. - if (!profile || !template_url) {
  15. - return NewTabURLDetails(local_url, NEW_TAB_URL_BAD);
  16. - }
  17. -
  18. - GURL search_provider_url(template_url->new_tab_url_ref().ReplaceSearchTerms(
  19. - TemplateURLRef::SearchTermsArgs(std::u16string()),
  20. - UIThreadSearchTermsData()));
  21. -
  22. - if (!search_provider_url.is_valid()) {
  23. - return NewTabURLDetails(local_url, NEW_TAB_URL_NOT_SET);
  24. - }
  25. - if (!search_provider_url.SchemeIsCryptographic()) {
  26. - return NewTabURLDetails(local_url, NEW_TAB_URL_INSECURE);
  27. - }
  28. - if (!IsURLAllowedForSupervisedUser(search_provider_url,
  29. - CHECK_DEREF(profile))) {
  30. - return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED);
  31. - }
  32. -
  33. - return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID);
  34. + return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
  35. }
  36. const GURL url;