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