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

Unified Diff: chrome/browser/ui/views/download/download_feedback_dialog_view.h

Issue 153353006: Opt out of download feedback from settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First version for review Created 6 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/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..85203fd7ffa59381b8f13d3a0526e65be5a0a38c 100644
--- a/chrome/browser/ui/views/download/download_feedback_dialog_view.h
+++ b/chrome/browser/ui/views/download/download_feedback_dialog_view.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "chrome/browser/safe_browsing/download_feedback_service.h"
#include "chrome/common/pref_names.h"
#include "ui/views/window/dialog_delegate.h"
@@ -16,28 +17,24 @@ class MessageBoxView;
class Profile;
+using safe_browsing::DownloadFeedbackService;
+
// Asks the user whether s/he wants to participate in the Safe Browsing
// download feedback program. Shown only for downloads marked DANGEROUS_HOST
// 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
- };
-
static void Show(
gfx::NativeWindow parent_window,
Profile* profile,
- const base::Callback<void(DownloadReportingStatus)>& callback);
+ const base::Callback<void(
+ DownloadFeedbackService::DownloadReportingStatus)>& callback);
private:
DownloadFeedbackDialogView(
Profile* profile,
- const base::Callback<void(DownloadReportingStatus)>& callback);
+ const base::Callback<void(
+ DownloadFeedbackService::DownloadReportingStatus)>& callback);
virtual ~DownloadFeedbackDialogView();
void ReleaseDialogStatusHold();
@@ -56,7 +53,8 @@ class DownloadFeedbackDialogView : public views::DialogDelegate {
virtual bool Accept() OVERRIDE;
Profile* profile_;
- const base::Callback<void(DownloadReportingStatus)> callback_;
+ const base::Callback<void(
+ DownloadFeedbackService::DownloadReportingStatus)> callback_;
views::MessageBoxView* explanation_box_view_;
base::string16 title_text_;
base::string16 ok_button_text_;

Powered by Google App Engine
This is Rietveld 408576698