| Index: chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h
|
| diff --git a/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h b/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h
|
| index 6137c84bcd618fa5c0df63b042b03def58b2e737..fab18a39f62048fc5b4b92b353c7c9d667f5e992 100644
|
| --- a/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h
|
| +++ b/chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h
|
| @@ -21,6 +21,7 @@ class ListValue;
|
| }
|
|
|
| namespace content {
|
| +class BrowsingDataFilterBuilder;
|
| class WebUI;
|
| }
|
|
|
| @@ -39,17 +40,21 @@ class ClearBrowsingDataHandler : public SettingsPageUIHandler,
|
| void OnJavascriptDisallowed() override;
|
|
|
| private:
|
| - // Observes one |remover| task initiated from ClearBrowsingDataHandler.
|
| - // Calls |callback| when the task is finished.
|
| - class TaskObserver;
|
| -
|
| // Clears browsing data, called by Javascript.
|
| void HandleClearBrowsingData(const base::ListValue* value);
|
|
|
| + // Parses a ListValue with important site information and creates a
|
| + // BrowsingDataFilterBuilder.
|
| + std::unique_ptr<content::BrowsingDataFilterBuilder> ProcessImportantSites(
|
| + const base::ListValue* important_sites);
|
| +
|
| // Called when a clearing task finished. |webui_callback_id| is provided
|
| // by the WebUI action that initiated it.
|
| void OnClearingTaskFinished(const std::string& webui_callback_id);
|
|
|
| + // Fetches important sites, called by Javascript.
|
| + void HandleFetchImportantSites(const base::ListValue* value);
|
| +
|
| // Initializes the dialog UI. Called by JavaScript when the DOM is ready.
|
| void HandleInitialize(const base::ListValue* args);
|
|
|
| @@ -85,9 +90,6 @@ class ClearBrowsingDataHandler : public SettingsPageUIHandler,
|
| // Counters that calculate the data volume for individual data types.
|
| std::vector<std::unique_ptr<browsing_data::BrowsingDataCounter>> counters_;
|
|
|
| - // Observes the currently active data clearing task.
|
| - std::unique_ptr<TaskObserver> task_observer_;
|
| -
|
| // ProfileSyncService to observe sync state changes.
|
| browser_sync::ProfileSyncService* sync_service_;
|
| ScopedObserver<browser_sync::ProfileSyncService, syncer::SyncServiceObserver>
|
| @@ -103,6 +105,8 @@ class ClearBrowsingDataHandler : public SettingsPageUIHandler,
|
| bool show_history_deletion_dialog_;
|
|
|
| // A weak pointer factory for asynchronous calls referencing this class.
|
| + // The weak pointers are invalidated in |OnJavascriptDisallowed()| and
|
| + // |HandleInitialize()| to cancel previously initiated tasks.
|
| base::WeakPtrFactory<ClearBrowsingDataHandler> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ClearBrowsingDataHandler);
|
|
|