Chromium Code Reviews| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 { "deauthorizeContentLicensesCheckbox", | 97 { "deauthorizeContentLicensesCheckbox", |
| 98 IDS_DEAUTHORIZE_CONTENT_LICENSES_CHKBOX }, | 98 IDS_DEAUTHORIZE_CONTENT_LICENSES_CHKBOX }, |
| 99 { "clearBrowserDataCommit", IDS_CLEAR_BROWSING_DATA_COMMIT }, | 99 { "clearBrowserDataCommit", IDS_CLEAR_BROWSING_DATA_COMMIT }, |
| 100 { "flash_storage_url", IDS_FLASH_STORAGE_URL }, | 100 { "flash_storage_url", IDS_FLASH_STORAGE_URL }, |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 RegisterStrings(localized_strings, resources, arraysize(resources)); | 103 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 104 RegisterTitle(localized_strings, "clearBrowserDataOverlay", | 104 RegisterTitle(localized_strings, "clearBrowserDataOverlay", |
| 105 IDS_CLEAR_BROWSING_DATA_TITLE); | 105 IDS_CLEAR_BROWSING_DATA_TITLE); |
| 106 localized_strings->SetString( | 106 localized_strings->SetString( |
| 107 "clearBrowsingDataLearnMoreUrl", | 107 "clearBrowsingDataLearnMoreUrl", kClearBrowsingDataLearnMoreUrl); |
|
Peter Kasting
2014/06/10 18:58:25
Nit: I have a slight preference for
localized_s
blundell
2014/06/11 12:07:19
Done.
| |
| 108 google_util::StringAppendGoogleLocaleParam( | |
| 109 kClearBrowsingDataLearnMoreUrl)); | |
| 110 | 108 |
| 111 ui::Accelerator acc(ui::VKEY_N, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN); | 109 ui::Accelerator acc(ui::VKEY_N, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN); |
| 112 localized_strings->SetString( | 110 localized_strings->SetString( |
| 113 "clearBrowserDataInfoBar", | 111 "clearBrowserDataInfoBar", |
| 114 l10n_util::GetStringFUTF16( | 112 l10n_util::GetStringFUTF16( |
| 115 IDS_CLEAR_BROWSING_DATA_INFO_BAR_TEXT, | 113 IDS_CLEAR_BROWSING_DATA_INFO_BAR_TEXT, |
| 116 acc.GetShortcutText())); | 114 acc.GetShortcutText())); |
| 117 | 115 |
| 118 base::ListValue* time_list = new base::ListValue; | 116 base::ListValue* time_list = new base::ListValue; |
| 119 for (int i = 0; i < 5; i++) { | 117 for (int i = 0; i < 5; i++) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); | 214 web_ui()->CallJavascriptFunction("ClearBrowserDataOverlay.doneClearing"); |
| 217 } | 215 } |
| 218 | 216 |
| 219 void ClearBrowserDataHandler::OnBrowsingHistoryPrefChanged() { | 217 void ClearBrowserDataHandler::OnBrowsingHistoryPrefChanged() { |
| 220 web_ui()->CallJavascriptFunction( | 218 web_ui()->CallJavascriptFunction( |
| 221 "ClearBrowserDataOverlay.setAllowDeletingHistory", | 219 "ClearBrowserDataOverlay.setAllowDeletingHistory", |
| 222 base::FundamentalValue(*allow_deleting_browser_history_)); | 220 base::FundamentalValue(*allow_deleting_browser_history_)); |
| 223 } | 221 } |
| 224 | 222 |
| 225 } // namespace options | 223 } // namespace options |
| OLD | NEW |