Chromium Code Reviews| 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 <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/scoped_observer.h" | 13 #include "base/scoped_observer.h" |
| 13 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 14 #include "chrome/browser/browsing_data/browsing_data_remover.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/browser/profile_sync_service.h" | 17 #include "components/browser_sync/browser/profile_sync_service.h" |
| 17 #include "components/browsing_data/counters/browsing_data_counter.h" | 18 #include "components/browsing_data/counters/browsing_data_counter.h" |
| 18 #include "components/prefs/pref_change_registrar.h" | 19 #include "components/prefs/pref_change_registrar.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 38 // WebUIMessageHandler implementation. | 39 // WebUIMessageHandler implementation. |
| 39 void RegisterMessages() override; | 40 void RegisterMessages() override; |
| 40 void OnJavascriptAllowed() override; | 41 void OnJavascriptAllowed() override; |
| 41 void OnJavascriptDisallowed() override; | 42 void OnJavascriptDisallowed() override; |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 // Clears browsing data, called by Javascript. | 45 // Clears browsing data, called by Javascript. |
| 45 void HandleClearBrowsingData(const base::ListValue* value); | 46 void HandleClearBrowsingData(const base::ListValue* value); |
| 46 | 47 |
| 47 // BrowsingDataRemover::Observer implementation. | 48 // BrowsingDataRemover::Observer implementation. |
| 48 // Re-enables clear button once all requested data has been removed. | 49 // Enable/disable clear button. |
| 50 void OnBrowsingDataRemoving(bool is_removing) override; | |
| 51 // Edge trigger. Show completion information. | |
|
Dan Beam
2016/07/07 18:06:49
i'd just remove the comments so people look at the
dschuyler
2016/07/20 19:01:15
Done.
| |
| 49 void OnBrowsingDataRemoverDone() override; | 52 void OnBrowsingDataRemoverDone() override; |
| 50 | 53 |
| 51 // Updates UI when the pref to allow clearing history changes. | 54 // Updates UI when the pref to allow clearing history changes. |
| 52 virtual void OnBrowsingHistoryPrefChanged(); | 55 virtual void OnBrowsingHistoryPrefChanged(); |
| 53 | 56 |
| 54 // Initializes the dialog UI. Called by JavaScript when the DOM is ready. | 57 // Initializes the dialog UI. Called by JavaScript when the DOM is ready. |
| 55 void HandleInitialize(const base::ListValue* args); | 58 void HandleInitialize(const base::ListValue* args); |
| 56 | 59 |
| 57 // Implementation of SyncServiceObserver. Updates the footer of the dialog | 60 // Implementation of SyncServiceObserver. Updates the footer of the dialog |
| 58 // when the sync state changes. | 61 // when the sync state changes. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 | 113 |
| 111 // A weak pointer factory for asynchronous calls referencing this class. | 114 // A weak pointer factory for asynchronous calls referencing this class. |
| 112 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_; | 115 base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_; |
| 113 | 116 |
| 114 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler); | 117 DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler); |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 } // namespace settings | 120 } // namespace settings |
| 118 | 121 |
| 119 #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 |