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

Unified Diff: chrome/browser/resources/settings/about_page/about_page_browser_proxy.js

Issue 2010653003: MD Settings: About page, implementing channel switcher dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup 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
Index: chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
diff --git a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
index 90c60f9a473196b82439c333250e38a274fce90a..18852fc0297e14b5cb2f99a7fdbc48df3f443167 100644
--- a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
+++ b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
@@ -75,6 +75,24 @@ cr.define('settings', function() {
assertNotReached();
}
+ /**
+ * @param {!BrowserChannel} currentChannel
+ * @param {!BrowserChannel} targetChannel
+ * @return {boolean} Whether the target channel is more stable than the
+ * current channel.
+ */
+ function isTargetChannelMoreStable(currentChannel, targetChannel) {
+ // List of channels in increasing stability order.
+ var channelList = [
+ BrowserChannel.DEV,
+ BrowserChannel.BETA,
+ BrowserChannel.STABLE,
+ ];
+ var currentIndex = channelList.indexOf(currentChannel);
+ var targetIndex = channelList.indexOf(targetChannel);
+ return currentIndex < targetIndex;
+ }
+
/** @interface */
function AboutPageBrowserProxy() {}
@@ -203,5 +221,6 @@ cr.define('settings', function() {
AboutPageBrowserProxy: AboutPageBrowserProxy,
AboutPageBrowserProxyImpl: AboutPageBrowserProxyImpl,
browserChannelToI18nId: browserChannelToI18nId,
+ isTargetChannelMoreStable: isTargetChannelMoreStable,
};
});

Powered by Google App Engine
This is Rietveld 408576698