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

Unified Diff: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.cc

Issue 2966453002: Chrome Cleaner UI: Add logs upload permission checkbox to the dialog (Closed)
Patch Set: More comments Created 3 years, 6 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/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.cc
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.cc
index 0a2cce239fbd6572c2047cef8b1d48d7a9f56c9d..7624e64ee5bbe98e32827cdd6dd7e7b2b97762b8 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.cc
@@ -57,11 +57,14 @@ ChromeCleanerDialogControllerImpl::~ChromeCleanerDialogControllerImpl() =
void ChromeCleanerDialogControllerImpl::DialogShown() {}
-void ChromeCleanerDialogControllerImpl::Accept() {
+void ChromeCleanerDialogControllerImpl::Accept(bool logs_enabled) {
DCHECK(browser_);
cleaner_controller_->ReplyWithUserResponse(
- browser_->profile(), ChromeCleanerController::UserResponse::kAccepted);
+ browser_->profile(),
+ logs_enabled
+ ? ChromeCleanerController::UserResponse::kAcceptedWithLogs
+ : ChromeCleanerController::UserResponse::kAcceptedWithoutLogs);
OpenSettingsPage(browser_);
OnInteractionDone();
}
@@ -82,11 +85,21 @@ void ChromeCleanerDialogControllerImpl::Close() {
OnInteractionDone();
}
-void ChromeCleanerDialogControllerImpl::DetailsButtonClicked() {
+void ChromeCleanerDialogControllerImpl::DetailsButtonClicked(
+ bool logs_enabled) {
+ cleaner_controller_->SetLogsEnabled(logs_enabled);
OpenSettingsPage(browser_);
OnInteractionDone();
}
+void ChromeCleanerDialogControllerImpl::SetLogsEnabled(bool logs_enabled) {
+ cleaner_controller_->SetLogsEnabled(logs_enabled);
+}
+
+bool ChromeCleanerDialogControllerImpl::LogsEnabled() {
+ return cleaner_controller_->logs_enabled();
+}
+
void ChromeCleanerDialogControllerImpl::OnIdle(
ChromeCleanerController::IdleReason idle_reason) {
if (!dialog_shown_)

Powered by Google App Engine
This is Rietveld 408576698