| 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 #include "chrome/browser/ui/webui/options2/clear_browser_data_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/clear_browser_data_handler2.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 static OptionsStringResource resources[] = { | 43 static OptionsStringResource resources[] = { |
| 44 { "clearBrowserDataLabel", IDS_CLEAR_BROWSING_DATA_LABEL }, | 44 { "clearBrowserDataLabel", IDS_CLEAR_BROWSING_DATA_LABEL }, |
| 45 { "deleteBrowsingHistoryCheckbox", IDS_DEL_BROWSING_HISTORY_CHKBOX }, | 45 { "deleteBrowsingHistoryCheckbox", IDS_DEL_BROWSING_HISTORY_CHKBOX }, |
| 46 { "deleteDownloadHistoryCheckbox", IDS_DEL_DOWNLOAD_HISTORY_CHKBOX }, | 46 { "deleteDownloadHistoryCheckbox", IDS_DEL_DOWNLOAD_HISTORY_CHKBOX }, |
| 47 { "deleteCacheCheckbox", IDS_DEL_CACHE_CHKBOX }, | 47 { "deleteCacheCheckbox", IDS_DEL_CACHE_CHKBOX }, |
| 48 { "deleteCookiesCheckbox", IDS_DEL_COOKIES_CHKBOX }, | 48 { "deleteCookiesCheckbox", IDS_DEL_COOKIES_CHKBOX }, |
| 49 { "deleteCookiesFlashCheckbox", IDS_DEL_COOKIES_FLASH_CHKBOX }, | 49 { "deleteCookiesFlashCheckbox", IDS_DEL_COOKIES_FLASH_CHKBOX }, |
| 50 { "deletePasswordsCheckbox", IDS_DEL_PASSWORDS_CHKBOX }, | 50 { "deletePasswordsCheckbox", IDS_DEL_PASSWORDS_CHKBOX }, |
| 51 { "deleteFormDataCheckbox", IDS_DEL_FORM_DATA_CHKBOX }, | 51 { "deleteFormDataCheckbox", IDS_DEL_FORM_DATA_CHKBOX }, |
| 52 { "clearBrowserDataCommit", IDS_CLEAR_BROWSING_DATA_COMMIT }, | 52 { "clearBrowserDataCommit", IDS_CLEAR_BROWSING_DATA_COMMIT }, |
| 53 { "flashStorageSettings", IDS_FLASH_STORAGE_SETTINGS }, | |
| 54 { "flash_storage_url", IDS_FLASH_STORAGE_URL }, | 53 { "flash_storage_url", IDS_FLASH_STORAGE_URL }, |
| 55 { "clearDataDeleting", IDS_CLEAR_DATA_DELETING }, | |
| 56 }; | 54 }; |
| 57 | 55 |
| 58 RegisterStrings(localized_strings, resources, arraysize(resources)); | 56 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 59 RegisterTitle(localized_strings, "clearBrowserDataOverlay", | 57 RegisterTitle(localized_strings, "clearBrowserDataOverlay", |
| 60 IDS_CLEAR_BROWSING_DATA_TITLE); | 58 IDS_CLEAR_BROWSING_DATA_TITLE); |
| 61 | 59 |
| 62 ListValue* time_list = new ListValue; | 60 ListValue* time_list = new ListValue; |
| 63 for (int i = 0; i < 5; i++) { | 61 for (int i = 0; i < 5; i++) { |
| 64 string16 label_string; | 62 string16 label_string; |
| 65 switch (i) { | 63 switch (i) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 135 } |
| 138 | 136 |
| 139 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { | 137 void ClearBrowserDataHandler::OnBrowsingDataRemoverDone() { |
| 140 // No need to remove ourselves as an observer as BrowsingDataRemover deletes | 138 // No need to remove ourselves as an observer as BrowsingDataRemover deletes |
| 141 // itself after we return. | 139 // itself after we return. |
| 142 remover_ = NULL; | 140 remover_ = NULL; |
| 143 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); | 141 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); |
| 144 } | 142 } |
| 145 | 143 |
| 146 } // namespace options2 | 144 } // namespace options2 |
| OLD | NEW |