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

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

Issue 2435933003: Further refactoring of SBER1 preference usage. (Closed)
Patch Set: Order functions alphabetically. Created 4 years, 2 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.cc
diff --git a/chrome/browser/ui/views/download/download_feedback_dialog_view.cc b/chrome/browser/ui/views/download/download_feedback_dialog_view.cc
index 4c11aec1817f728ddbc236f001b9ae2cf89267bb..ba04c8dfe1538c53a59ee712501187a85861168c 100644
--- a/chrome/browser/ui/views/download/download_feedback_dialog_view.cc
+++ b/chrome/browser/ui/views/download/download_feedback_dialog_view.cc
@@ -46,8 +46,7 @@ void DownloadFeedbackDialogView::Show(
content::PageNavigator* navigator,
const UserDecisionCallback& callback) {
// This dialog should only be shown if it hasn't been shown before.
- DCHECK(!profile->GetPrefs()->HasPrefPath(
- safe_browsing::GetExtendedReportingPrefName()));
+ DCHECK(!safe_browsing::ExtendedReportingPrefExists(*profile->GetPrefs()));
// Only one dialog should be shown at a time, so check to see if another one
// is open. If another one is open, treat this parallel call as if reporting
@@ -102,8 +101,7 @@ base::string16 DownloadFeedbackDialogView::GetDialogButtonLabel(
}
bool DownloadFeedbackDialogView::OnButtonClicked(bool accepted) {
- profile_->GetPrefs()->SetBoolean(
- safe_browsing::GetExtendedReportingPrefName(), accepted);
+ safe_browsing::SetExtendedReportingPref(profile_->GetPrefs(), accepted);
DialogStatusData* data =
static_cast<DialogStatusData*>(profile_->GetUserData(kDialogStatusKey));
DCHECK(data);

Powered by Google App Engine
This is Rietveld 408576698