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

Unified Diff: chrome/browser/ui/webui/offline/offline_internals_ui.cc

Issue 2274733002: [Offline pages] Add null pointer checks in offline internals code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incognito Created 4 years, 3 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
Index: chrome/browser/ui/webui/offline/offline_internals_ui.cc
diff --git a/chrome/browser/ui/webui/offline/offline_internals_ui.cc b/chrome/browser/ui/webui/offline/offline_internals_ui.cc
index 1d05ae8abb51b9e26cb6e6a63c937c6cf0062970..af76f693c1ab57317965012072ac47bf47f225e1 100644
--- a/chrome/browser/ui/webui/offline/offline_internals_ui.cc
+++ b/chrome/browser/ui/webui/offline/offline_internals_ui.cc
@@ -29,7 +29,10 @@ OfflineInternalsUI::OfflineInternalsUI(content::WebUI* web_ui)
IDR_OFFLINE_INTERNALS_BROWSER_PROXY_JS);
html_source->SetDefaultResource(IDR_OFFLINE_INTERNALS_HTML);
- content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source);
+ Profile* profile = Profile::FromWebUI(web_ui);
+ html_source->AddBoolean("isIncognito", profile->IsOffTheRecord());
+
+ content::WebUIDataSource::Add(profile, html_source);
web_ui->AddMessageHandler(
new offline_internals::OfflineInternalsUIMessageHandler());

Powered by Google App Engine
This is Rietveld 408576698