| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_cont
roller.h" | |
| 6 | |
| 7 #include "base/strings/utf_string_conversions.h" | |
| 8 | |
| 9 namespace safe_browsing { | |
| 10 | |
| 11 namespace { | |
| 12 | |
| 13 // Some dummy strings to be displayed in the Cleaner dialog while iterating on | |
| 14 // the dialog's UX design and work on the Chrome<->Cleaner IPC is ongoing. | |
| 15 constexpr char kWindowTitle[] = "Clean up your computer?"; | |
| 16 constexpr char kMainText[] = | |
| 17 "Chrome found software that harms your browsing experience. Remove related " | |
| 18 "files from your computer and restore browser settings, including your " | |
| 19 "search engine and home page."; | |
| 20 constexpr char kAcceptButtonLabel[] = "Cleanup"; | |
| 21 constexpr char kAdvancedButtonLabel[] = "Advanced"; | |
| 22 | |
| 23 } // namespace | |
| 24 | |
| 25 ChromeCleanerDialogController::ChromeCleanerDialogController() {} | |
| 26 | |
| 27 ChromeCleanerDialogController::~ChromeCleanerDialogController() = default; | |
| 28 | |
| 29 base::string16 ChromeCleanerDialogController::GetWindowTitle() const { | |
| 30 return base::UTF8ToUTF16(kWindowTitle); | |
| 31 } | |
| 32 | |
| 33 base::string16 ChromeCleanerDialogController::GetMainText() const { | |
| 34 return base::UTF8ToUTF16(kMainText); | |
| 35 } | |
| 36 | |
| 37 base::string16 ChromeCleanerDialogController::GetAcceptButtonLabel() const { | |
| 38 return base::UTF8ToUTF16(kAcceptButtonLabel); | |
| 39 } | |
| 40 | |
| 41 base::string16 ChromeCleanerDialogController::GetAdvancedButtonLabel() const { | |
| 42 return base::UTF8ToUTF16(kAdvancedButtonLabel); | |
| 43 } | |
| 44 | |
| 45 void ChromeCleanerDialogController::DialogShown() {} | |
| 46 | |
| 47 void ChromeCleanerDialogController::Accept() { | |
| 48 OnInteractionDone(); | |
| 49 } | |
| 50 | |
| 51 void ChromeCleanerDialogController::Cancel() { | |
| 52 OnInteractionDone(); | |
| 53 } | |
| 54 | |
| 55 void ChromeCleanerDialogController::Close() { | |
| 56 OnInteractionDone(); | |
| 57 } | |
| 58 | |
| 59 void ChromeCleanerDialogController::AdvancedButtonClicked() { | |
| 60 OnInteractionDone(); | |
| 61 } | |
| 62 | |
| 63 void ChromeCleanerDialogController::OnInteractionDone() { | |
| 64 delete this; | |
| 65 } | |
| 66 | |
| 67 } // namespace safe_browsing | |
| OLD | NEW |