| Index: chrome/browser/ui/views/download/download_feedback_dialog_view.h
|
| diff --git a/chrome/browser/ui/views/download/download_feedback_dialog_view.h b/chrome/browser/ui/views/download/download_feedback_dialog_view.h
|
| index 6037512ee20eb60922d0260f0837072c2f8267be..95da725904df0e1c658fa3ec46a83f11098639e4 100644
|
| --- a/chrome/browser/ui/views/download/download_feedback_dialog_view.h
|
| +++ b/chrome/browser/ui/views/download/download_feedback_dialog_view.h
|
| @@ -21,26 +21,23 @@ class Profile;
|
| // or UNCOMMON_DOWNLOAD. The user should only see this dialog once.
|
| class DownloadFeedbackDialogView : public views::DialogDelegate {
|
| public:
|
| - // Possible values for prefs::kSafeBrowsingDownloadReportingEnabled pref.
|
| - enum DownloadReportingStatus {
|
| - kDialogNotYetShown,
|
| - kDownloadReportingDisabled, // Set by Cancel().
|
| - kDownloadReportingEnabled, // Set by Accept().
|
| - kMaxValue
|
| - };
|
| + // Callback with the user's decision. |accepted| is true if the user clicked
|
| + // Accept(). Otherwise, assume the user cancelled.
|
| + typedef base::Callback<void(bool accepted)> UserDecisionCallback;
|
|
|
| static void Show(
|
| gfx::NativeWindow parent_window,
|
| Profile* profile,
|
| - const base::Callback<void(DownloadReportingStatus)>& callback);
|
| + const UserDecisionCallback& callback);
|
|
|
| private:
|
| DownloadFeedbackDialogView(
|
| Profile* profile,
|
| - const base::Callback<void(DownloadReportingStatus)>& callback);
|
| + const UserDecisionCallback& callback);
|
| virtual ~DownloadFeedbackDialogView();
|
|
|
| - void ReleaseDialogStatusHold();
|
| + // Handles the user's decision.
|
| + bool OnButtonClicked(bool accepted);
|
|
|
| // views::DialogDelegate:
|
| virtual ui::ModalType GetModalType() const OVERRIDE;
|
| @@ -56,7 +53,7 @@ class DownloadFeedbackDialogView : public views::DialogDelegate {
|
| virtual bool Accept() OVERRIDE;
|
|
|
| Profile* profile_;
|
| - const base::Callback<void(DownloadReportingStatus)> callback_;
|
| + const UserDecisionCallback callback_;
|
| views::MessageBoxView* explanation_box_view_;
|
| base::string16 title_text_;
|
| base::string16 ok_button_text_;
|
|
|