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

Unified Diff: chrome/browser/ui/webui/uber/uber_ui.cc

Issue 2034473003: [MD History] Disable MD History for supervised users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hide_search_bar
Patch Set: Created 4 years, 7 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 | « chrome/browser/ui/webui/md_history_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/uber/uber_ui.cc
diff --git a/chrome/browser/ui/webui/uber/uber_ui.cc b/chrome/browser/ui/webui/uber/uber_ui.cc
index ea1a5bfe9a9edeab99e41183be86b65702f4dc80..ba5203f126432ebcc768121c77f56281446f46af 100644
--- a/chrome/browser/ui/webui/uber/uber_ui.cc
+++ b/chrome/browser/ui/webui/uber/uber_ui.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
#include "chrome/browser/ui/webui/log_web_ui_url.h"
+#include "chrome/browser/ui/webui/md_history_ui.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
@@ -82,6 +83,7 @@ content::WebUIDataSource* CreateUberFrameHTMLSource(
content::BrowserContext* browser_context) {
content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIUberFrameHost);
+ Profile* profile = Profile::FromBrowserContext(browser_context);
source->SetJsonPath("strings.js");
source->AddResourcePath("uber_frame.js", IDR_UBER_FRAME_JS);
@@ -111,14 +113,14 @@ content::WebUIDataSource* CreateUberFrameHTMLSource(
source->AddString("overridesHistory", overrides_history ? "yes" : "no");
source->AddBoolean(
"hideHistory",
- base::FeatureList::IsEnabled(features::kMaterialDesignHistoryFeature)
+ MdHistoryUI::IsEnabled(profile)
&& !overrides_history);
source->DisableDenyXFrameOptions();
source->OverrideContentSecurityPolicyFrameSrc("frame-src chrome:;");
source->AddBoolean("profileIsGuest",
- Profile::FromBrowserContext(browser_context)->IsGuestSession());
+ profile->IsGuestSession());
Dan Beam 2016/06/03 04:51:07 unwrap
return source;
}
« no previous file with comments | « chrome/browser/ui/webui/md_history_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698