Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: chrome/browser/ui/webui/ntp_tiles_internals_ui.cc

Issue 2584483002: Fix ntp-tiles-internals crash in incognito mode (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp_tiles_internals_ui.cc
diff --git a/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc b/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc
index 5564716a93801bf7942d5f47894192ba7d670a3e..e12782d398966b0131c69742fe8e284417da313a 100644
--- a/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc
+++ b/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc
@@ -42,6 +42,7 @@ class ChromeNTPTilesInternalsMessageHandlerClient
void RegisterMessages() override;
// ntp_tiles::NTPTilesInternalsMessageHandlerClient
+ bool SupportsNTPTiles() override;
bool DoesSourceExist(ntp_tiles::NTPTileSource source) override;
std::unique_ptr<ntp_tiles::MostVisitedSites> MakeMostVisitedSites() override;
std::unique_ptr<ntp_tiles::PopularSites> MakePopularSites() override;
@@ -62,6 +63,11 @@ void ChromeNTPTilesInternalsMessageHandlerClient::RegisterMessages() {
handler_.RegisterMessages(this);
}
+bool ChromeNTPTilesInternalsMessageHandlerClient::SupportsNTPTiles() {
+ Profile* profile = Profile::FromWebUI(web_ui());
+ return !(profile->IsGuestSession() || profile->IsOffTheRecord());
+}
+
bool ChromeNTPTilesInternalsMessageHandlerClient::DoesSourceExist(
ntp_tiles::NTPTileSource source) {
switch (source) {
« no previous file with comments | « no previous file | components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698