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

Unified Diff: chrome/browser/resources/settings/basic_page/basic_page.js

Issue 2866463002: Revert of MD Settings: Elim SettingsSubpageBrowsertest and SettingsPageVisibility (Closed)
Patch Set: Created 3 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
Index: chrome/browser/resources/settings/basic_page/basic_page.js
diff --git a/chrome/browser/resources/settings/basic_page/basic_page.js b/chrome/browser/resources/settings/basic_page/basic_page.js
index 4032ade5091d750830b47e9b0c096be08ad0edb6..d360e891f428705bfcc79d468745f7fb91989688 100644
--- a/chrome/browser/resources/settings/basic_page/basic_page.js
+++ b/chrome/browser/resources/settings/basic_page/basic_page.js
@@ -9,7 +9,7 @@
Polymer({
is: 'settings-basic-page',
- behaviors: [MainPageBehavior],
+ behaviors: [SettingsPageVisibility, MainPageBehavior],
properties: {
/** Preferences state. */
@@ -18,9 +18,11 @@
notify: true,
},
- /**
- * Dictionary defining page visibility. Controlled by settings-ui.
- * @type {!PageVisibility|undefined}
+ showAndroidApps: Boolean,
+
+ /**
+ * Dictionary defining page visibility.
+ * @type {!GuestModePageVisibility}
*/
pageVisibility: Object,
@@ -132,23 +134,6 @@
});
},
- /**
- * @param {boolean|undefined} visibility
- * @return {boolean}
- * @private
- */
- showPage_: function(visibility) {
- return visibility !== false;
- },
-
- /**
- * @param {string} subpage
- * @return {!Object}
- */
- getPageVisibility_: function(subpage) {
- return /** @type {Object} */ (this.get(subpage, this.pageVisibility)) || {};
- },
-
// <if expr="chromeos">
/**
* @return {boolean}
@@ -163,6 +148,16 @@
/** @private */
onResetProfileBannerClosed_: function() {
this.showResetProfileBanner_ = false;
+ },
+
+ /**
+ * @return {boolean}
+ * @private
+ */
+ shouldShowAndroidApps_: function() {
+ var visibility = /** @type {boolean|undefined} */ (
+ this.get('pageVisibility.androidApps'));
+ return this.showAndroidApps && this.showPage(visibility);
},
/**
@@ -224,6 +219,15 @@
},
/**
+ * @param {(boolean|undefined)} visibility
+ * @return {boolean} True unless visibility is false.
+ * @private
+ */
+ showAdvancedSettings_: function(visibility) {
+ return visibility !== false;
+ },
+
+ /**
* @param {boolean} opened Whether the menu is expanded.
* @return {string} Icon name.
* @private

Powered by Google App Engine
This is Rietveld 408576698