Chromium Code Reviews| Index: chrome/browser/download/download_danger_prompt.cc |
| diff --git a/chrome/browser/download/download_danger_prompt.cc b/chrome/browser/download/download_danger_prompt.cc |
| index bdd75cc4d58c2eb7c6cc8cabcdf19b80154d5bef..892d891394a5c1911b6150626ea93ff62d6925fb 100644 |
| --- a/chrome/browser/download/download_danger_prompt.cc |
| +++ b/chrome/browser/download/download_danger_prompt.cc |
| @@ -42,6 +42,7 @@ class DownloadDangerPromptImpl |
| virtual string16 GetAcceptButtonTitle() OVERRIDE; |
| virtual void OnAccepted() OVERRIDE; |
| virtual void OnCanceled() OVERRIDE; |
| + virtual void OnDismissed() OVERRIDE; |
| // Runs |callback|. PrepareToClose() is called beforehand. Doing so prevents |
| // this object from responding to state changes in |download_| that might |
| @@ -146,6 +147,10 @@ void DownloadDangerPromptImpl::OnCanceled() { |
| RunCallback(canceled_); |
| } |
| +void DownloadDangerPromptImpl::OnDismissed() { |
| + RunCallback(canceled_); |
|
fdoray
2013/06/28 15:32:59
Should I call OnCanceled here to avoid code duplic
benjhayden
2013/06/28 16:05:46
I have a slight preference for calling RunCallback
|
| +} |
| + |
| void DownloadDangerPromptImpl::RunCallback(const base::Closure& callback) { |
| // Invoking the callback can cause the download item state to change or cause |
| // the constrained window to close, and |callback| refers to a member |