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/options/clear_browser_data_handler.h" | 5 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.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/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 { "deleteDownloadHistoryCheckbox", IDS_DEL_DOWNLOAD_HISTORY_CHKBOX }, | 88 { "deleteDownloadHistoryCheckbox", IDS_DEL_DOWNLOAD_HISTORY_CHKBOX }, |
89 { "deleteCacheCheckbox", IDS_DEL_CACHE_CHKBOX }, | 89 { "deleteCacheCheckbox", IDS_DEL_CACHE_CHKBOX }, |
90 { "deleteCookiesCheckbox", IDS_DEL_COOKIES_CHKBOX }, | 90 { "deleteCookiesCheckbox", IDS_DEL_COOKIES_CHKBOX }, |
91 { "deleteCookiesFlashCheckbox", IDS_DEL_COOKIES_FLASH_CHKBOX }, | 91 { "deleteCookiesFlashCheckbox", IDS_DEL_COOKIES_FLASH_CHKBOX }, |
92 { "deletePasswordsCheckbox", IDS_DEL_PASSWORDS_CHKBOX }, | 92 { "deletePasswordsCheckbox", IDS_DEL_PASSWORDS_CHKBOX }, |
93 { "deleteFormDataCheckbox", IDS_DEL_FORM_DATA_CHKBOX }, | 93 { "deleteFormDataCheckbox", IDS_DEL_FORM_DATA_CHKBOX }, |
94 { "deleteHostedAppsDataCheckbox", IDS_DEL_HOSTED_APPS_DATA_CHKBOX }, | 94 { "deleteHostedAppsDataCheckbox", IDS_DEL_HOSTED_APPS_DATA_CHKBOX }, |
95 { "deauthorizeContentLicensesCheckbox", | 95 { "deauthorizeContentLicensesCheckbox", |
96 IDS_DEAUTHORIZE_CONTENT_LICENSES_CHKBOX }, | 96 IDS_DEAUTHORIZE_CONTENT_LICENSES_CHKBOX }, |
97 { "clearBrowserDataCommit", IDS_CLEAR_BROWSING_DATA_COMMIT }, | 97 { "clearBrowserDataCommit", IDS_CLEAR_BROWSING_DATA_COMMIT }, |
98 { "flash_storage_url", IDS_FLASH_STORAGE_URL }, | 98 { "flashStorageUrl", IDS_FLASH_STORAGE_URL }, |
99 }; | 99 }; |
100 | 100 |
101 RegisterStrings(localized_strings, resources, arraysize(resources)); | 101 RegisterStrings(localized_strings, resources, arraysize(resources)); |
102 RegisterTitle(localized_strings, "clearBrowserDataOverlay", | 102 RegisterTitle(localized_strings, "clearBrowserDataOverlay", |
103 IDS_CLEAR_BROWSING_DATA_TITLE); | 103 IDS_CLEAR_BROWSING_DATA_TITLE); |
104 localized_strings->SetString("clearBrowsingDataLearnMoreUrl", | 104 localized_strings->SetString("clearBrowsingDataLearnMoreUrl", |
105 kClearBrowsingDataLearnMoreUrl); | 105 kClearBrowsingDataLearnMoreUrl); |
106 | 106 |
107 ui::Accelerator acc(ui::VKEY_N, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN); | 107 ui::Accelerator acc(ui::VKEY_N, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN); |
108 localized_strings->SetString( | 108 localized_strings->SetString( |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); | 212 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); |
213 } | 213 } |
214 | 214 |
215 void ClearBrowserDataHandler::OnBrowsingHistoryPrefChanged() { | 215 void ClearBrowserDataHandler::OnBrowsingHistoryPrefChanged() { |
216 web_ui()->CallJavascriptFunction( | 216 web_ui()->CallJavascriptFunction( |
217 "ClearBrowserDataOverlay.setAllowDeletingHistory", | 217 "ClearBrowserDataOverlay.setAllowDeletingHistory", |
218 base::FundamentalValue(*allow_deleting_browser_history_)); | 218 base::FundamentalValue(*allow_deleting_browser_history_)); |
219 } | 219 } |
220 | 220 |
221 } // namespace options | 221 } // namespace options |
OLD | NEW |