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