The OneGoogleBar on the local NTP should use content area sign-in state (i.e. cookies) instead of Chrome sign-in state (OAuth2).
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2 commit 042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2 Author: Marc Treib <treib@chromium.org> Date: Fri Aug 04 13:28:22 2017 OneGoogleBar on local NTP: Use cookie auth instead of OAuth2 This is achieved by talking to a different endpoint for fetching the OGB sources, which accepts cookies. As a consequence, the cached data is now cleared when the Gaia cookies change, rather than when the SigninManager state changes. Bug: 740462 Change-Id: Id230a118507e32e6f1a17c103c93c8eb5ccb0ba6 Reviewed-on: https://chromium-review.googlesource.com/595990 Commit-Queue: Marc Treib <treib@chromium.org> Reviewed-by: Chris Pickel <sfiera@chromium.org> Cr-Commit-Position: refs/heads/master@{#492008} [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.h [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl_unittest.cc [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/search/one_google_bar/one_google_bar_service.cc [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/search/one_google_bar/one_google_bar_service.h [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/search/one_google_bar/one_google_bar_service_factory.cc [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/search/one_google_bar/one_google_bar_service_unittest.cc [modify] https://crrev.com/042810ea7bce7b9fcc17ad12f308b4d9b6db0ff2/chrome/browser/ui/search/local_ntp_browsertest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b0f67312440011e649eb0463daaaca28702da823 commit b0f67312440011e649eb0463daaaca28702da823 Author: Marc Treib <treib@chromium.org> Date: Thu Aug 10 16:05:32 2017 OneGoogleBar on local NTP: Send UI language in hl= parameter This makes the OneGoogleBar use Chrome's UI language, to be consistent with the rest of the local NTP. Bug: 740462 Change-Id: I14c7b3c7f24d815c7fba2782ef64b881de302a0a Reviewed-on: https://chromium-review.googlesource.com/608968 Commit-Queue: Marc Treib <treib@chromium.org> Reviewed-by: Chris Pickel <sfiera@chromium.org> Cr-Commit-Position: refs/heads/master@{#493405} [modify] https://crrev.com/b0f67312440011e649eb0463daaaca28702da823/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc [modify] https://crrev.com/b0f67312440011e649eb0463daaaca28702da823/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.h [modify] https://crrev.com/b0f67312440011e649eb0463daaaca28702da823/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl_unittest.cc [modify] https://crrev.com/b0f67312440011e649eb0463daaaca28702da823/chrome/browser/search/one_google_bar/one_google_bar_service_factory.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e6b0ad5d57e7793576286bab0585b947d9c1f15e commit e6b0ad5d57e7793576286bab0585b947d9c1f15e Author: Marc Treib <treib@chromium.org> Date: Fri Aug 11 12:01:34 2017 OneGoogleBarService: don't notify on signin state change if cache is empty A change to the signin state causes the OneGoogleBarService to clear its cache. If the cache was already empty before, there is no need to notify observers. This fixes a bug where the One Google Bar sometimes doesn't appear on the first NTP right after Chrome startup, where the following happened: - LocalNtpSource calls OneGoogleBarService::Refresh. - Before the request completes, the service gets a signin change notification (maybe because some cookies got loaded from disk?) and tells the LocalNtpSource "there's no OGB right now". - The request finishes successfully, but the NTP has already gotten the "no OGB" notification. Bug: 740462 Change-Id: I94144c9f32a33d140261558dfaf8be36a5126061 Reviewed-on: https://chromium-review.googlesource.com/612166 Reviewed-by: Chris Pickel <sfiera@chromium.org> Commit-Queue: Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#493705} [modify] https://crrev.com/e6b0ad5d57e7793576286bab0585b947d9c1f15e/chrome/browser/search/one_google_bar/one_google_bar_service.cc [modify] https://crrev.com/e6b0ad5d57e7793576286bab0585b947d9c1f15e/chrome/browser/search/one_google_bar/one_google_bar_service_unittest.cc
Comment 1 by fi...@chromium.org
, Jul 20 2017