commit | 7fee808fe3d1decf0fb85c5fbd7ca47979667260 | [log] [tgz] |
---|---|---|
author | adamta <adamta@google.com> | Fri Nov 12 20:29:15 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 12 20:29:15 2021 |
tree | b60004bdc50a00ad5b996b0f82277392ae4a6b9e | |
parent | b142ddc6c17b17ff740b17fc49d8e586dc8d9085 [diff] |
[iOS] Don't reload NTP for incognito (cherry picked from commit 13ea7ac64e666ba87bb93ea45e4b7c58d3cf764f) Bug: 1189129 Change-Id: I376556db1041b9e29de870132afdfb46982fc01c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3271599 Commit-Queue: Adam Trudeau-Arcaro <adamta@google.com> Reviewed-by: Sergio Collazos <sczs@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#940438} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3278374 Cr-Commit-Position: refs/branch-heads/4664@{#992} Cr-Branched-From: 24dc4ee75e01a29d390d43c9c264372a169273a7-refs/heads/main@{#929512}
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.h b/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.h index 4ca1095..e83969b 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.h +++ b/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.h
@@ -64,7 +64,7 @@ // The content offset of the scroll view. - (CGPoint)contentOffset; -// Reloads the content of the NewTabPage. +// Reloads the content of the NewTabPage. Does not do anything on Incognito. - (void)reload; // Calls when the visibility of the NTP changes.
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm b/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm index 35397642..b699b591 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm +++ b/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm
@@ -440,6 +440,9 @@ } - (void)reload { + if (self.browser->GetBrowserState()->IsOffTheRecord()) { + return; + } ios::GetChromeBrowserProvider().GetDiscoverFeedProvider()->RefreshFeed(); [self reloadContentSuggestions]; }