OLD | NEW |
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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/scoped_observer.h" | 13 #include "base/scoped_observer.h" |
14 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 14 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 15 #include "chrome/browser/engagement/important_sites_util.h" |
15 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" | 17 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" |
17 #include "components/browser_sync/profile_sync_service.h" | 18 #include "components/browser_sync/profile_sync_service.h" |
18 #include "components/browsing_data/core/counters/browsing_data_counter.h" | 19 #include "components/browsing_data/core/counters/browsing_data_counter.h" |
19 | 20 |
20 namespace base { | 21 namespace base { |
21 class ListValue; | 22 class ListValue; |
22 } | 23 } |
23 | 24 |
24 namespace content { | 25 namespace content { |
(...skipping 22 matching lines...) Expand all Loading... |
47 // Clears browsing data, called by Javascript. | 48 // Clears browsing data, called by Javascript. |
48 void HandleClearBrowsingData(const base::ListValue* value); | 49 void HandleClearBrowsingData(const base::ListValue* value); |
49 | 50 |
50 // Called when a clearing task finished. |webui_callback_id| is provided | 51 // Called when a clearing task finished. |webui_callback_id| is provided |
51 // by the WebUI action that initiated it. | 52 // by the WebUI action that initiated it. |
52 void OnClearingTaskFinished(const std::string& webui_callback_id); | 53 void OnClearingTaskFinished(const std::string& webui_callback_id); |
53 | 54 |
54 // Fetches important sites, called by Javascript. | 55 // Fetches important sites, called by Javascript. |
55 void HandleFetchImportantSites(const base::ListValue* value); | 56 void HandleFetchImportantSites(const base::ListValue* value); |
56 | 57 |
| 58 void OnFetchImportantSitesFinished( |
| 59 const std::string& callback_id, |
| 60 std::vector<ImportantSitesUtil::ImportantDomainInfo> sites); |
| 61 |
57 // Initializes the dialog UI. Called by JavaScript when the DOM is ready. | 62 // Initializes the dialog UI. Called by JavaScript when the DOM is ready. |
58 void HandleInitialize(const base::ListValue* args); | 63 void HandleInitialize(const base::ListValue* args); |
59 | 64 |
60 // Implementation of SyncServiceObserver. | 65 // Implementation of SyncServiceObserver. |
61 void OnStateChanged(syncer::SyncService* sync) override; | 66 void OnStateChanged(syncer::SyncService* sync) override; |
62 | 67 |
63 // Updates the footer of the dialog when the sync state changes. | 68 // Updates the footer of the dialog when the sync state changes. |
64 void UpdateSyncState(); | 69 void UpdateSyncState(); |
65 | 70 |
66 // Finds out whether we should show notice about other forms of history stored | 71 // Finds out whether we should show notice about other forms of history stored |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 113 |
109 // A weak pointer factory for asynchronous calls referencing this class. | 114 // A weak pointer factory for asynchronous calls referencing this class. |
110 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_; | 115 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_; |
111 | 116 |
112 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler); | 117 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler); |
113 }; | 118 }; |
114 | 119 |
115 } // namespace settings | 120 } // namespace settings |
116 | 121 |
117 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER
_H_ | 122 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_CLEAR_BROWSING_DATA_HANDLER
_H_ |
OLD | NEW |