| 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_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/prefs/pref_member.h" | 10 #include "base/prefs/pref_member.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // OptionsPageUIHandler implementation. | 26 // OptionsPageUIHandler implementation. |
| 27 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; | 27 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
| 28 void InitializeHandler() override; | 28 void InitializeHandler() override; |
| 29 void InitializePage() override; | 29 void InitializePage() override; |
| 30 | 30 |
| 31 // WebUIMessageHandler implementation. | 31 // WebUIMessageHandler implementation. |
| 32 void RegisterMessages() override; | 32 void RegisterMessages() override; |
| 33 | 33 |
| 34 void UpdateInfoBannerVisibility(); | 34 void UpdateInfoBannerVisibility(); |
| 35 | 35 |
| 36 // Constructs the text to be displayed by a counter from the given |result|. | |
| 37 static base::string16 GetCounterTextFromResult( | |
| 38 const BrowsingDataCounter::Result* result); | |
| 39 | |
| 40 private: | 36 private: |
| 41 // Javascript callback for when the CBD dialog is opened. The caller does | 37 // Javascript callback for when the CBD dialog is opened. The caller does |
| 42 // not provide any parameters, so |value| is unused. | 38 // not provide any parameters, so |value| is unused. |
| 43 void OnPageOpened(const base::ListValue* value); | 39 void OnPageOpened(const base::ListValue* value); |
| 44 | 40 |
| 45 // Javascript callback to start clearing data. | 41 // Javascript callback to start clearing data. |
| 46 void HandleClearBrowserData(const base::ListValue* value); | 42 void HandleClearBrowserData(const base::ListValue* value); |
| 47 | 43 |
| 48 // BrowsingDataRemover::Observer implementation. | 44 // BrowsingDataRemover::Observer implementation. |
| 49 // Closes the dialog once all requested data has been removed. | 45 // Closes the dialog once all requested data has been removed. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 77 |
| 82 // Informs us whether the user is syncing their data. | 78 // Informs us whether the user is syncing their data. |
| 83 ProfileSyncService* sync_service_; | 79 ProfileSyncService* sync_service_; |
| 84 | 80 |
| 85 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); | 81 DISALLOW_COPY_AND_ASSIGN(ClearBrowserDataHandler); |
| 86 }; | 82 }; |
| 87 | 83 |
| 88 } // namespace options | 84 } // namespace options |
| 89 | 85 |
| 90 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ | 86 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ |
| OLD | NEW |