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

Unified Diff: chrome/browser/resources/history/history.js

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/app_controller_mac.mm ('k') | chrome/browser/supervised_user/supervised_user_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index edfcd913ff7c094b404dd7e640bfa75fd73ce7c2..a3690b01f646a8766df6f39e62e2b1ec75c84f83 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -1682,9 +1682,9 @@ HistoryView.prototype.updateFocusGrid_ = function() {
HistoryView.prototype.updateNavBar_ = function() {
this.updateRangeButtons_();
- // Supervised users have the control bar on top, don't show it on the bottom
- // as well.
- if (!loadTimeData.getBoolean('isSupervisedProfile')) {
+ // If grouping by domain is enabled, there's a control bar on top, don't show
+ // the one on the bottom as well.
+ if (!loadTimeData.getBoolean('groupByDomain')) {
$('newest-button').hidden = this.pageIndex_ == 0;
$('newer-button').hidden = this.pageIndex_ == 0;
$('older-button').hidden =
@@ -1924,7 +1924,7 @@ function load() {
});
}
- if (!loadTimeData.getBoolean('showDeleteVisitUI'))
+ if (loadTimeData.getBoolean('hideDeleteVisitUI'))
$('remove-visit').hidden = true;
searchField.addEventListener('search', doSearch);
@@ -1935,15 +1935,16 @@ function load() {
activeVisit = null;
});
- // Only show the controls if the command line switch is activated.
- if (loadTimeData.getBoolean('groupByDomain') ||
- loadTimeData.getBoolean('isSupervisedProfile')) {
- // Hide the top container which has the "Clear browsing data" and "Remove
- // selected entries" buttons since they're unavailable for supervised users.
- $('top-container').hidden = true;
+ // Only show the controls if the command line switch is activated or the user
+ // is supervised.
+ if (loadTimeData.getBoolean('groupByDomain')) {
$('history-page').classList.add('big-topbar-page');
$('filter-controls').hidden = false;
}
+ // Hide the top container which has the "Clear browsing data" and "Remove
+ // selected entries" buttons if deleting history is not allowed.
+ if (!loadTimeData.getBoolean('allowDeletingHistory'))
+ $('top-container').hidden = true;
uber.setTitle(loadTimeData.getString('title'));
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/supervised_user/supervised_user_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698