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

Unified Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2598893002: [MD settings] lighter weight initializer for protocol handler enabled messages (Closed)
Patch Set: Created 4 years 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/site_settings/site_settings_prefs_browser_proxy.js
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
index b510502f3d3b8d3c31bb95c674bb3e6a3cd2c649..b4f46190841aaed3718b2945340f993b8f59ff02 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -209,11 +209,23 @@ cr.define('settings', function() {
/**
* Initializes the protocol handler list. List is returned through JS calls
- * to setHandlersEnabled, setProtocolHandlers & setIgnoredProtocolHandlers.
+ * to 'setHandlersEnabled', 'setProtocolHandlers', and
dpapad 2016/12/22 19:39:02 Nit (optional): Looking at the C++ handler, setPro
dschuyler 2016/12/22 19:58:15 Seems reasonable - let's look at that further in a
+ * 'setIgnoredProtocolHandler'.
dschuyler 2016/12/22 02:00:05 I like the quotes because it helps me see them as
dpapad 2016/12/22 19:39:02 Nit: I think is more common in Chromium comments t
dschuyler 2016/12/22 19:58:15 Yeah, I've seen (and use) that for code. What abou
dpapad 2016/12/22 20:08:35 The current comment phrasing makes it sound that "
dschuyler 2016/12/22 21:54:39 Done.
*/
initializeProtocolHandlerList: function() {},
/**
+ * Initializes the protocol handler so that updates are sent. The
+ * 'setHandlersEnabled' update will be sent immediately and updates may
+ * follow.
+ *
+ * There's no need to call both initializeProtocolHandlerList
+ * and initializeProtocolHandlerUpdates. The *Updates version is lighter
+ * because it doesn't send the list.
dschuyler 2016/12/22 02:00:05 I could easily re-arrange this so that they are in
dpapad 2016/12/22 19:39:02 IIUC initializeProtocolHandlerList and initializeP
dschuyler 2016/12/22 19:58:15 It's not that one sends the initial state and one
dpapad 2016/12/22 20:08:35 Ack. If there are two bools needed, then my under
dschuyler 2016/12/22 21:54:39 Sounds like a good thing to get into the style gui
+ */
+ initializeProtocolHandlerUpdates: function() {},
+
+ /**
* Enables or disables the ability for sites to ask to become the default
* protocol handlers.
* @param {boolean} enabled Whether sites can ask to become default.
@@ -358,6 +370,10 @@ cr.define('settings', function() {
chrome.send('initializeProtocolHandlerList');
},
+ initializeProtocolHandlerUpdates: function() {
+ chrome.send('initializeProtocolHandlerUpdates');
+ },
+
/** @override */
setProtocolHandlerDefault: function(enabled) {
chrome.send('setHandlersEnabled', [enabled]);

Powered by Google App Engine
This is Rietveld 408576698