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

Side by Side Diff: chrome/browser/ui/webui/options/clear_browser_data_handler.h

Issue 1813023002: Add a notice about other forms of history to the CBD dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_component
Patch Set: Update strings. Created 4 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "chrome/browser/browsing_data/browsing_data_counter.h" 10 #include "chrome/browser/browsing_data/browsing_data_counter.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Adds a |counter| for browsing data. 51 // Adds a |counter| for browsing data.
52 void AddCounter(scoped_ptr<BrowsingDataCounter> counter); 52 void AddCounter(scoped_ptr<BrowsingDataCounter> counter);
53 53
54 // Updates a counter in the UI according to the |result|. 54 // Updates a counter in the UI according to the |result|.
55 void UpdateCounterText(scoped_ptr<BrowsingDataCounter::Result> result); 55 void UpdateCounterText(scoped_ptr<BrowsingDataCounter::Result> result);
56 56
57 // Implementation of SyncServiceObserver. Updates the support string at the 57 // Implementation of SyncServiceObserver. Updates the support string at the
58 // bottom of the dialog. 58 // bottom of the dialog.
59 void OnStateChanged() override; 59 void OnStateChanged() override;
60 60
61 // Finds out whether we should show a notice informing the user about other
62 // forms of browsing history. Responds with an asynchronous callback to
63 // |UpdateHistoryNotice|.
64 void RefreshHistoryNotice();
65
66 // Shows or hides the notice about other forms of browsing history.
67 void UpdateHistoryNotice(bool show);
68
69 // Remembers whether we should popup a dialog about other forms of browsing
70 // history when the user deletes the history for the first time.
71 void UpdateHistoryDeletionDialog(bool show);
72
61 // If non-null it means removal is in progress. 73 // If non-null it means removal is in progress.
62 BrowsingDataRemover* remover_; 74 BrowsingDataRemover* remover_;
63 75
64 // Keeps track of whether clearing LSO data is supported. 76 // Keeps track of whether clearing LSO data is supported.
65 BooleanPrefMember clear_plugin_lso_data_enabled_; 77 BooleanPrefMember clear_plugin_lso_data_enabled_;
66 78
67 // Keeps track of whether Pepper Flash is enabled and thus Flapper-specific 79 // Keeps track of whether Pepper Flash is enabled and thus Flapper-specific
68 // settings and removal options (e.g. Content Licenses) are available. 80 // settings and removal options (e.g. Content Licenses) are available.
69 BooleanPrefMember pepper_flash_settings_enabled_; 81 BooleanPrefMember pepper_flash_settings_enabled_;
70 82
71 // Keeps track of whether deleting browsing history and downloads is allowed. 83 // Keeps track of whether deleting browsing history and downloads is allowed.
72 BooleanPrefMember allow_deleting_browser_history_; 84 BooleanPrefMember allow_deleting_browser_history_;
73 85
74 // Counters that calculate the data volume for some of the data types. 86 // Counters that calculate the data volume for some of the data types.
75 ScopedVector<BrowsingDataCounter> counters_; 87 ScopedVector<BrowsingDataCounter> counters_;
76 88
77 // Informs us whether the user is syncing their data. 89 // Informs us whether the user is syncing their data.
78 ProfileSyncService* sync_service_; 90 ProfileSyncService* sync_service_;
79 91
92 // Whether we should show a notice about other forms of browsing history.
93 bool should_show_history_notice_;
94
95 // Whether we should popup a dialog about other forms of browsing history
96 // when the user deletes their browsing history for the first time.
97 bool should_show_history_deletion_dialog_;
98
99 // A weak pointer factory for asynchronous calls referencing this class.
100 base::WeakPtrFactory<ClearBrowserDataHandler> weak_ptr_factory_;
101
80 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); 102 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler);
81 }; 103 };
82 104
83 } // namespace options 105 } // namespace options
84 106
85 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ 107 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.cc ('k') | chrome/browser/ui/webui/options/clear_browser_data_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698