OLD | NEW |
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 <memory> | 8 #include <memory> |
| 9 #include <vector> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_vector.h" | |
12 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 12 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
13 #include "chrome/browser/ui/webui/options/options_ui.h" | 13 #include "chrome/browser/ui/webui/options/options_ui.h" |
14 #include "components/browser_sync/profile_sync_service.h" | 14 #include "components/browser_sync/profile_sync_service.h" |
15 #include "components/browsing_data/core/counters/browsing_data_counter.h" | 15 #include "components/browsing_data/core/counters/browsing_data_counter.h" |
16 #include "components/prefs/pref_member.h" | 16 #include "components/prefs/pref_member.h" |
17 | 17 |
18 namespace options { | 18 namespace options { |
19 | 19 |
20 // Clear browser data handler page UI handler. | 20 // Clear browser data handler page UI handler. |
21 class ClearBrowserDataHandler : public OptionsPageUIHandler, | 21 class ClearBrowserDataHandler : public OptionsPageUIHandler, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // If non-null it means removal is in progress. | 76 // If non-null it means removal is in progress. |
77 BrowsingDataRemover* remover_; | 77 BrowsingDataRemover* remover_; |
78 | 78 |
79 // Keeps track of whether clearing LSO data is supported. | 79 // Keeps track of whether clearing LSO data is supported. |
80 BooleanPrefMember clear_plugin_lso_data_enabled_; | 80 BooleanPrefMember clear_plugin_lso_data_enabled_; |
81 | 81 |
82 // Keeps track of whether deleting browsing history and downloads is allowed. | 82 // Keeps track of whether deleting browsing history and downloads is allowed. |
83 BooleanPrefMember allow_deleting_browser_history_; | 83 BooleanPrefMember allow_deleting_browser_history_; |
84 | 84 |
85 // Counters that calculate the data volume for some of the data types. | 85 // Counters that calculate the data volume for some of the data types. |
86 ScopedVector<browsing_data::BrowsingDataCounter> counters_; | 86 std::vector<std::unique_ptr<browsing_data::BrowsingDataCounter>> counters_; |
87 | 87 |
88 // Informs us whether the user is syncing their data. | 88 // Informs us whether the user is syncing their data. |
89 browser_sync::ProfileSyncService* sync_service_; | 89 browser_sync::ProfileSyncService* sync_service_; |
90 | 90 |
91 // Whether we should show a notice about other forms of browsing history. | 91 // Whether we should show a notice about other forms of browsing history. |
92 bool should_show_history_notice_; | 92 bool should_show_history_notice_; |
93 | 93 |
94 // Whether we should popup a dialog about other forms of browsing history | 94 // Whether we should popup a dialog about other forms of browsing history |
95 // when the user deletes their browsing history for the first time. | 95 // when the user deletes their browsing history for the first time. |
96 bool should_show_history_deletion_dialog_; | 96 bool should_show_history_deletion_dialog_; |
97 | 97 |
98 // A weak pointer factory for asynchronous calls referencing this class. | 98 // A weak pointer factory for asynchronous calls referencing this class. |
99 base::WeakPtrFactory<ClearBrowserDataHandler> weak_ptr_factory_; | 99 base::WeakPtrFactory<ClearBrowserDataHandler> weak_ptr_factory_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); | 101 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); |
102 }; | 102 }; |
103 | 103 |
104 } // namespace options | 104 } // namespace options |
105 | 105 |
106 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ | 106 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
OLD | NEW |