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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_ui.h

Issue 1758013002: WebUI: Allow rejecting a promise that is returned from cr.sendWithPromise(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-rename Created 4 years, 10 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/ui/webui/settings/md_settings_ui.h
diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.h b/chrome/browser/ui/webui/settings/md_settings_ui.h
index 3895925b73ec1a4c9af9c21e6f966ebd679b41da..301f4f25c38269f754eac18ed208f54778c377b5 100644
--- a/chrome/browser/ui/webui/settings/md_settings_ui.h
+++ b/chrome/browser/ui/webui/settings/md_settings_ui.h
@@ -29,9 +29,16 @@ class SettingsPageUIHandler : public content::WebUIMessageHandler {
protected:
// Helper method for responding to JS requests initiated with
- // cr.sendWithPromise().
- void CallJavascriptCallback(const base::Value& callback_id,
- const base::Value& response);
+ // cr.sendWithPromise(), for the case where the returned promise should be
+ // resolved (request succeeded).
+ void ResolveJavascriptCallback(const base::Value& callback_id,
+ const base::Value& response);
+
+ // Helper method for responding to JS requests initiated with
+ // cr.sendWithPromise(), for the case where the returned promise should be
+ // rejected (request failed).
+ void RejectJavascriptCallback(const base::Value& callback_id,
+ const base::Value& response);
private:
DISALLOW_COPY_AND_ASSIGN(SettingsPageUIHandler);
« no previous file with comments | « chrome/browser/ui/webui/settings/appearance_handler.cc ('k') | chrome/browser/ui/webui/settings/md_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698