|
|
Chromium Code Reviews|
Created:
4 years, 2 months ago by alito Modified:
4 years, 2 months ago CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, arv+watch_chromium.org, tommycli Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionmd-settings: add routing to chrome://settings/triggeredResetProfileSettings
Adds the triggered veriant of the reset settings dialog in md-settings
and adds a URL alias for it.
BUG=636408
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Committed: https://crrev.com/4f9795e4f49c40f5a7cc8c6a619539ca71999551
Cr-Commit-Position: refs/heads/master@{#424794}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Addressed Dan's comments. #
Total comments: 4
Patch Set 3 : Nits #
Total comments: 2
Patch Set 4 : Fixed nits #Patch Set 5 : Rebase. #Patch Set 6 : Rebase #Messages
Total messages: 42 (20 generated)
Description was changed from ========== md-settings: add routing to chrome://settings/triggeredResetProfileSettings Adds the triggered veriant of the reset settings dialog in md-settings and adds a URL alias for it. BUG=636408 ========== to ========== md-settings: add routing to chrome://settings/triggeredResetProfileSettings Adds the triggered veriant of the reset settings dialog in md-settings and adds a URL alias for it. BUG=636408 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
alito@chromium.org changed reviewers: + robertshield@chromium.org
Hi Robert. Could you take a first pass at this? Thx. /ali
dbeam@chromium.org changed reviewers: + dbeam@chromium.org
https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_browser_proxy.js (right): https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_browser_proxy.js:40: * @return {!Promise} A promise firing with the tool name, once it has been can this be templatized, i.e. Promise<string>? https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.html (right): https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_profile_dialog.html:27: <div class="title">[[getPageTitle_(isTriggered_, triggeredResetToolName_)]]</div> 80 col wrap https://codereview.chromium.org/2371303002/diff/1/chrome/browser/ui/webui/set... File chrome/browser/ui/webui/settings/reset_settings_handler.cc (right): https://codereview.chromium.org/2371303002/diff/1/chrome/browser/ui/webui/set... chrome/browser/ui/webui/settings/reset_settings_handler.cc:248: CHECK(args->GetString(0, &callback_id)); instead of getting this as a string and then making a string value, can you just leave this as a base::Value and forward it along to ResolveJavascriptCallback()? as in: base::Value* callback_id; args->Get(0, &callback_id);
change lgtm generally, defer to Dan for final review.
Thanks Robert. Thanks Dan for you comments. PTAnL. https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_browser_proxy.js (right): https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_browser_proxy.js:40: * @return {!Promise} A promise firing with the tool name, once it has been On 2016/09/28 01:40:09, Dan Beam wrote: > can this be templatized, i.e. Promise<string>? Done. https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.html (right): https://codereview.chromium.org/2371303002/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_profile_dialog.html:27: <div class="title">[[getPageTitle_(isTriggered_, triggeredResetToolName_)]]</div> On 2016/09/28 01:40:09, Dan Beam wrote: > 80 col wrap Done. https://codereview.chromium.org/2371303002/diff/1/chrome/browser/ui/webui/set... File chrome/browser/ui/webui/settings/reset_settings_handler.cc (right): https://codereview.chromium.org/2371303002/diff/1/chrome/browser/ui/webui/set... chrome/browser/ui/webui/settings/reset_settings_handler.cc:248: CHECK(args->GetString(0, &callback_id)); On 2016/09/28 01:40:09, Dan Beam wrote: > instead of getting this as a string and then making a string value, can you just > leave this as a base::Value and forward it along to ResolveJavascriptCallback()? > as in: > > base::Value* callback_id; > args->Get(0, &callback_id); Done.
lgtm w/nit https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_page.js (right): https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_page.js:41: currentRouteChanged: function(route) { nit: var isTriggered = route == settings.Route.TRIGGERED_RESET_DIALOG; if (isTriggered || route == settings.Route.RESET_DIALOG) this.$.resetProfileDialog.get().open(isTriggered); https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:82: this.triggeredResetToolName_ = name; don't we want to call .showModal() AFTER we have the tool name in this case?
Fixed all nits. +cc tommycli in case he is interested. https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_page.js (right): https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_page.js:41: currentRouteChanged: function(route) { On 2016/09/28 04:34:52, Dan Beam wrote: > nit: > > var isTriggered = route == settings.Route.TRIGGERED_RESET_DIALOG; > if (isTriggered || route == settings.Route.RESET_DIALOG) > this.$.resetProfileDialog.get().open(isTriggered); Done. https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2371303002/diff/20001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:82: this.triggeredResetToolName_ = name; On 2016/09/28 04:34:53, Dan Beam wrote: > don't we want to call .showModal() AFTER we have the tool name in this case? Done. I figured the tool name would be updated in the dialog once this.triggeredResetToolName_ was set, and it worked. But explicitly waiting until we have the name seems better.
still lgtm https://codereview.chromium.org/2371303002/diff/40001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2371303002/diff/40001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:88: this.browserProxy_.onShowResetProfileDialog(); maybe combine these 2 lines into a method? showDialog_: function() { this.$.dialog.showModal(); this.browserProxy_.onShowResetProfileDialog(); }, if (isTriggered) { this.browserProxy_.getTriggeredResetToolName().then(function(name) { this.triggeredResetToolName_ = name; this.showDialog_(); }.bind(this)); } else { this.showDialog_(); } or a local function? var showDialog = function() { this.$.dialog.showModal(); this.browserProxy_.onShowResetProfileDialog(); }.bind(this); if (isTriggered) { this.browserProxy_.getTriggeredResetToolName().then(function(name) { this.triggeredResetToolName_ = name; showDialog(); }.bind(this)); } else { showDialog(); }
tommycli@chromium.org changed reviewers: + tommycli@chromium.org
This seems fine. Thanks!
still lgtm in case you're waiting on me
The CQ bit was checked by alito@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
I rebased in order to pick up the fix in https://codereview.chromium.org/2375223002/. I have tested the CL manually on linux and Windows and plan to land this if all tests pass. https://codereview.chromium.org/2371303002/diff/40001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2371303002/diff/40001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:88: this.browserProxy_.onShowResetProfileDialog(); On 2016/09/28 06:12:19, Dan Beam wrote: > maybe combine these 2 lines into a method? > > showDialog_: function() { > this.$.dialog.showModal(); > this.browserProxy_.onShowResetProfileDialog(); > }, > > if (isTriggered) { > this.browserProxy_.getTriggeredResetToolName().then(function(name) { > this.triggeredResetToolName_ = name; > this.showDialog_(); > }.bind(this)); > } else { > this.showDialog_(); > } > > or a local function? > > var showDialog = function() { > this.$.dialog.showModal(); > this.browserProxy_.onShowResetProfileDialog(); > }.bind(this); > > if (isTriggered) { > this.browserProxy_.getTriggeredResetToolName().then(function(name) { > this.triggeredResetToolName_ = name; > showDialog(); > }.bind(this)); > } else { > showDialog(); > } Done.
The CQ bit was checked by alito@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from robertshield@chromium.org, tommycli@chromium.org, dbeam@chromium.org Link to the patchset: https://codereview.chromium.org/2371303002/#ps80001 (title: "Rebase.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by alito@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by alito@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tommycli@chromium.org, robertshield@chromium.org, dbeam@chromium.org Link to the patchset: https://codereview.chromium.org/2371303002/#ps100001 (title: "Rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by alito@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
On 2016/10/12 14:10:36, commit-bot: I haz the power wrote: > Try jobs failed on following builders: > ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) I'm not able to commit because of http://crbug.com/654806 ([Slave Mishbehaving] for iOS related slaves, preventing the CQ to function). Will track and try to land once that is fixed.
The CQ bit was checked by alito@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== md-settings: add routing to chrome://settings/triggeredResetProfileSettings Adds the triggered veriant of the reset settings dialog in md-settings and adds a URL alias for it. BUG=636408 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== md-settings: add routing to chrome://settings/triggeredResetProfileSettings Adds the triggered veriant of the reset settings dialog in md-settings and adds a URL alias for it. BUG=636408 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/4f9795e4f49c40f5a7cc8c6a619539ca71999551 Cr-Commit-Position: refs/heads/master@{#424794} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/4f9795e4f49c40f5a7cc8c6a619539ca71999551 Cr-Commit-Position: refs/heads/master@{#424794} |
