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

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

Issue 2966453002: Chrome Cleaner UI: Add logs upload permission checkbox to the dialog (Closed)
Patch Set: More comments Created 3 years, 5 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_DIALOG_CONTRO LLER_WIN_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_DIALOG_CONTRO LLER_WIN_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_DIALOG_CONTRO LLER_WIN_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_DIALOG_CONTRO LLER_WIN_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace safe_browsing { 10 namespace safe_browsing {
11 11
12 // Provides functions, such as |Accept()| and |Cancel()|, that should 12 // Provides functions, such as |Accept()| and |Cancel()|, that should
13 // be called by the Chrome Cleaner UI in response to user actions. 13 // be called by the Chrome Cleaner UI in response to user actions.
14 // 14 //
15 // Implementations manage their own lifetimes and delete themselves once the 15 // Implementations manage their own lifetimes and delete themselves once the
16 // Cleaner dialog has been dismissed and either of |Accept()|, |Cancel()| or 16 // Cleaner dialog has been dismissed and either of |Accept()|, |Cancel()| or
17 // |Close()| have been called. 17 // |Close()| have been called.
18 class ChromeCleanerDialogController { 18 class ChromeCleanerDialogController {
19 public: 19 public:
20 // Called by the Cleaner dialog when the dialog has been shown. Used for 20 // Called by the Cleaner dialog when the dialog has been shown. Used for
21 // reporting metrics. 21 // reporting metrics.
22 virtual void DialogShown() = 0; 22 virtual void DialogShown() = 0;
23 // Called by the Cleaner dialog when user accepts the prompt. Once |Accept()| 23 // Called by the Cleaner dialog when user accepts the prompt. Once |Accept()|
24 // has been called, the controller will eventually delete itself and no member 24 // has been called, the controller will eventually delete itself and no member
25 // functions should be called after that. 25 // functions should be called after that.
26 virtual void Accept() = 0; 26 virtual void Accept(bool logs_enabled) = 0;
27 // Called by the Cleaner dialog when the dialog is closed via the cancel 27 // Called by the Cleaner dialog when the dialog is closed via the cancel
28 // button. Once |Cancel()| has been called, the controller will eventually 28 // button. Once |Cancel()| has been called, the controller will eventually
29 // delete itself and no member functions should be called after that. 29 // delete itself and no member functions should be called after that.
30 virtual void Cancel() = 0; 30 virtual void Cancel() = 0;
31 // Called by the Cleaner dialog when the dialog is closed by some other means 31 // Called by the Cleaner dialog when the dialog is closed by some other means
32 // than the cancel button (for example, by pressing Esc or clicking the 'x' on 32 // than the cancel button (for example, by pressing Esc or clicking the 'x' on
33 // the top of the dialog). After a call to |Dismiss()|, the controller will 33 // the top of the dialog). After a call to |Dismiss()|, the controller will
34 // eventually delete itself and no member functions should be called after 34 // eventually delete itself and no member functions should be called after
35 // that. 35 // that.
36 virtual void Close() = 0; 36 virtual void Close() = 0;
37 // Called when the details button is clicked, after which the dialog will 37 // Called when the details button is clicked, after which the dialog will
38 // close. After a call to |DetailsButtonClicked()|, the controller will 38 // close. After a call to |DetailsButtonClicked()|, the controller will
39 // eventually delete itself and no member functions should be called after 39 // eventually delete itself and no member functions should be called after
40 // that. 40 // that.
41 virtual void DetailsButtonClicked() = 0; 41 virtual void DetailsButtonClicked(bool logs_enabled) = 0;
42
43 // To be called by the dialog when the user changes the state of the logs
44 // upload permission checkbox.
45 virtual void SetLogsEnabled(bool logs_enabled) = 0;
46 // Returns whether logs upload is currently enabled. Used to set the dialog's
47 // default permission checkbox state.
48 virtual bool LogsEnabled() = 0;
42 49
43 protected: 50 protected:
44 virtual ~ChromeCleanerDialogController() {} 51 virtual ~ChromeCleanerDialogController() {}
45 }; 52 };
46 53
47 } // namespace safe_browsing 54 } // namespace safe_browsing
48 55
49 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_DIALOG_CON TROLLER_WIN_H_ 56 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_DIALOG_CON TROLLER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698