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

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

Issue 697693004: Supervised users: if history recording is off, allow incognito and deleting history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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/toolbar/wrench_menu_model.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/history_ui.cc
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index cff1769b82575952fa9ce56cd2012eb89cc76909..7c82157aa2f10182851127a71d483bb61a70ec15 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -177,21 +177,23 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) {
source->AddLocalizedString("entrySummary", IDS_HISTORY_ENTRY_SUMMARY);
source->AddBoolean("isFullHistorySyncEnabled",
WebHistoryServiceFactory::GetForProfile(profile) != NULL);
- source->AddBoolean("groupByDomain",
+ source->AddBoolean("groupByDomain", profile->IsSupervised() ||
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kHistoryEnableGroupByDomain));
- source->AddBoolean("allowDeletingHistory",
- prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory));
+ bool allow_deleting_history =
+ prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory);
+ source->AddBoolean("allowDeletingHistory", allow_deleting_history);
source->AddBoolean("isInstantExtendedApiEnabled",
chrome::IsInstantExtendedAPIEnabled());
+ source->AddBoolean("isSupervisedProfile", profile->IsSupervised());
+ source->AddBoolean("hideDeleteVisitUI",
+ profile->IsSupervised() && !allow_deleting_history);
source->SetJsonPath(kStringsJsFile);
source->AddResourcePath(kHistoryJsFile, IDR_HISTORY_JS);
source->AddResourcePath(kOtherDevicesJsFile, IDR_OTHER_DEVICES_JS);
source->SetDefaultResource(IDR_HISTORY_HTML);
source->DisableDenyXFrameOptions();
- source->AddBoolean("isSupervisedProfile", profile->IsSupervised());
- source->AddBoolean("showDeleteVisitUI", !profile->IsSupervised());
return source;
}
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698