| 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_OPTIONS2_CLEAR_BROWSER_DATA_HANDLER2_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CLEAR_BROWSER_DATA_HANDLER2_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CLEAR_BROWSER_DATA_HANDLER2_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CLEAR_BROWSER_DATA_HANDLER2_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/browsing_data_remover.h" | 9 #include "chrome/browser/browsing_data_remover.h" |
| 10 #include "chrome/browser/prefs/pref_member.h" | 10 #include "chrome/browser/prefs/pref_member.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; | 23 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; |
| 24 virtual void InitializeHandler() OVERRIDE; | 24 virtual void InitializeHandler() OVERRIDE; |
| 25 | 25 |
| 26 // WebUIMessageHandler implementation. | 26 // WebUIMessageHandler implementation. |
| 27 virtual void RegisterMessages() OVERRIDE; | 27 virtual void RegisterMessages() OVERRIDE; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // Javascript callback to start clearing data. | 30 // Javascript callback to start clearing data. |
| 31 void HandleClearBrowserData(const ListValue* value); | 31 void HandleClearBrowserData(const ListValue* value); |
| 32 | 32 |
| 33 // Callback from BrowsingDataRemover. Closes the dialog. | 33 // Callback from BrowsingDataRemover. Calls OnAllDataRemoved once both |
| 34 // protected and unprotected data are removed. |
| 34 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 35 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
| 35 | 36 |
| 37 // Closes the dialog once all requested data has been removed. |
| 38 void OnAllDataRemoved(); |
| 39 |
| 40 // Clears the data of hosted apps, which is otherwise protected from deletion |
| 41 // when the user clears regular browsing data. |
| 42 void ClearHostedAppData(); |
| 43 |
| 36 // If non-null it means removal is in progress. BrowsingDataRemover takes care | 44 // If non-null it means removal is in progress. BrowsingDataRemover takes care |
| 37 // of deleting itself when done. | 45 // of deleting itself when done. |
| 38 BrowsingDataRemover* remover_; | 46 BrowsingDataRemover* remover_; |
| 39 | 47 |
| 40 // Keeps track of whether clearing LSO data is supported. | 48 // Keeps track of whether clearing LSO data is supported. |
| 41 BooleanPrefMember clear_plugin_lso_data_enabled_; | 49 BooleanPrefMember clear_plugin_lso_data_enabled_; |
| 42 | 50 |
| 51 // Indicates that we also need to delete hosted app data after finishing the |
| 52 // first removal operation. |
| 53 bool remove_hosted_app_data_pending_; |
| 54 |
| 43 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); | 55 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); |
| 44 }; | 56 }; |
| 45 | 57 |
| 46 } // namespace options2 | 58 } // namespace options2 |
| 47 | 59 |
| 48 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CLEAR_BROWSER_DATA_HANDLER2_H_ | 60 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CLEAR_BROWSER_DATA_HANDLER2_H_ |
| OLD | NEW |