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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h

Issue 2098633002: Migrate the one-time notice into the MD settings CBD dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_counters
Patch Set: Initialize to false. Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void OnStateChanged() override; 59 void OnStateChanged() override;
60 60
61 // Finds out whether we should show notice about other forms of history stored 61 // Finds out whether we should show notice about other forms of history stored
62 // in user's account. 62 // in user's account.
63 void RefreshHistoryNotice(); 63 void RefreshHistoryNotice();
64 64
65 // Called as an asynchronous response to |RefreshHistoryNotice()|. Shows or 65 // Called as an asynchronous response to |RefreshHistoryNotice()|. Shows or
66 // hides the footer about other forms of history stored in user's account. 66 // hides the footer about other forms of history stored in user's account.
67 void UpdateHistoryNotice(bool show); 67 void UpdateHistoryNotice(bool show);
68 68
69 // Called as an asynchronous response to |RefreshHistoryNotice()|. Enables or
70 // disables the dialog about other forms of history stored in user's account
71 // that is shown when the history deletion is finished.
72 void UpdateHistoryDeletionDialog(bool show);
73
69 // Adds a browsing data |counter|. 74 // Adds a browsing data |counter|.
70 void AddCounter(std::unique_ptr<BrowsingDataCounter> counter); 75 void AddCounter(std::unique_ptr<BrowsingDataCounter> counter);
71 76
72 // Updates a counter text according to the |result|. 77 // Updates a counter text according to the |result|.
73 void UpdateCounterText(std::unique_ptr<BrowsingDataCounter::Result> result); 78 void UpdateCounterText(std::unique_ptr<BrowsingDataCounter::Result> result);
74 79
75 // Cached profile corresponding to the WebUI of this handler. 80 // Cached profile corresponding to the WebUI of this handler.
76 Profile* profile_; 81 Profile* profile_;
77 82
78 // Counters that calculate the data volume for individual data types. 83 // Counters that calculate the data volume for individual data types.
(...skipping 10 matching lines...) Expand all
89 // The WebUI callback ID of the last performClearBrowserData request. There 94 // The WebUI callback ID of the last performClearBrowserData request. There
90 // can only be one such request in-flight. 95 // can only be one such request in-flight.
91 std::string webui_callback_id_; 96 std::string webui_callback_id_;
92 97
93 // Used to listen for pref changes to allow / disallow deleting browsing data. 98 // Used to listen for pref changes to allow / disallow deleting browsing data.
94 PrefChangeRegistrar profile_pref_registrar_; 99 PrefChangeRegistrar profile_pref_registrar_;
95 100
96 // Whether the sentence about other forms of history stored in user's account 101 // Whether the sentence about other forms of history stored in user's account
97 // should be displayed in the footer. This value is retrieved asynchronously, 102 // should be displayed in the footer. This value is retrieved asynchronously,
98 // so we cache it here. 103 // so we cache it here.
99 bool should_show_history_footer_; 104 bool show_history_footer_;
105
106 // Whether we should show a dialog informing the user about other forms of
107 // history stored in their account after the history deletion is finished.
108 bool show_history_deletion_dialog_;
100 109
101 // A weak pointer factory for asynchronous calls referencing this class. 110 // A weak pointer factory for asynchronous calls referencing this class.
102 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_; 111 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_;
103 112
104 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler); 113 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler);
105 }; 114 };
106 115
107 } // namespace settings 116 } // namespace settings
108 117
109 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER _H_ 118 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698