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

Side by Side Diff: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_win.cc

Issue 2883673002: Chrome Cleaner: Update modal dialog's strings (Closed)
Patch Set: Moved to the non-android section in BUILD file. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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/chrome_cleaner/chrome_cleaner_dialog_cont roller.h" 5 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_cont roller_win.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "chrome/grit/chromium_strings.h"
8 #include "chrome/grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h"
8 10
9 namespace safe_browsing { 11 namespace safe_browsing {
10 12
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() {} 13 ChromeCleanerDialogController::ChromeCleanerDialogController() {}
26 14
27 ChromeCleanerDialogController::~ChromeCleanerDialogController() = default; 15 ChromeCleanerDialogController::~ChromeCleanerDialogController() = default;
28 16
29 base::string16 ChromeCleanerDialogController::GetWindowTitle() const { 17 base::string16 ChromeCleanerDialogController::GetWindowTitle() const {
30 return base::UTF8ToUTF16(kWindowTitle); 18 return l10n_util::GetStringUTF16(IDS_CHROME_CLEANUP_PROMPT_TITLE);
31 } 19 }
32 20
33 base::string16 ChromeCleanerDialogController::GetMainText() const { 21 base::string16 ChromeCleanerDialogController::GetMainText() const {
34 return base::UTF8ToUTF16(kMainText); 22 return l10n_util::GetStringUTF16(IDS_CHROME_CLEANUP_PROMPT_EXPLANATION);
35 } 23 }
36 24
37 base::string16 ChromeCleanerDialogController::GetAcceptButtonLabel() const { 25 base::string16 ChromeCleanerDialogController::GetAcceptButtonLabel() const {
38 return base::UTF8ToUTF16(kAcceptButtonLabel); 26 return l10n_util::GetStringUTF16(
27 IDS_CHROME_CLEANUP_PROMPT_REMOVE_BUTTON_LABEL);
39 } 28 }
40 29
41 base::string16 ChromeCleanerDialogController::GetAdvancedButtonLabel() const { 30 base::string16 ChromeCleanerDialogController::GetDetailsButtonLabel() const {
42 return base::UTF8ToUTF16(kAdvancedButtonLabel); 31 return l10n_util::GetStringUTF16(
32 IDS_CHROME_CLEANUP_PROMPT_DETAILS_BUTTON_LABEL);
43 } 33 }
44 34
45 void ChromeCleanerDialogController::DialogShown() {} 35 void ChromeCleanerDialogController::DialogShown() {}
46 36
47 void ChromeCleanerDialogController::Accept() { 37 void ChromeCleanerDialogController::Accept() {
48 OnInteractionDone(); 38 OnInteractionDone();
49 } 39 }
50 40
51 void ChromeCleanerDialogController::Cancel() { 41 void ChromeCleanerDialogController::Cancel() {
52 OnInteractionDone(); 42 OnInteractionDone();
53 } 43 }
54 44
55 void ChromeCleanerDialogController::Close() { 45 void ChromeCleanerDialogController::Close() {
56 OnInteractionDone(); 46 OnInteractionDone();
57 } 47 }
58 48
59 void ChromeCleanerDialogController::AdvancedButtonClicked() { 49 void ChromeCleanerDialogController::DetailsButtonClicked() {
60 OnInteractionDone(); 50 OnInteractionDone();
61 } 51 }
62 52
63 void ChromeCleanerDialogController::OnInteractionDone() { 53 void ChromeCleanerDialogController::OnInteractionDone() {
64 delete this; 54 delete this;
65 } 55 }
66 56
67 } // namespace safe_browsing 57 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_win.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698