| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_WEEK); | 208 label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_WEEK); |
| 209 break; | 209 break; |
| 210 case 3: | 210 case 3: |
| 211 label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_4WEEKS); | 211 label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_4WEEKS); |
| 212 break; | 212 break; |
| 213 case 4: | 213 case 4: |
| 214 label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_EVERYTHING); | 214 label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_EVERYTHING); |
| 215 break; | 215 break; |
| 216 } | 216 } |
| 217 base::ListValue* option = new base::ListValue(); | 217 base::ListValue* option = new base::ListValue(); |
| 218 option->Append(new base::FundamentalValue(i)); | 218 option->AppendInteger(i); |
| 219 option->Append(new base::StringValue(label_string)); | 219 option->AppendString(label_string); |
| 220 time_list->Append(option); | 220 time_list->Append(option); |
| 221 } | 221 } |
| 222 localized_strings->Set("clearBrowserDataTimeList", time_list); | 222 localized_strings->Set("clearBrowserDataTimeList", time_list); |
| 223 localized_strings->SetBoolean("showDeleteBrowsingHistoryCheckboxes", | 223 localized_strings->SetBoolean("showDeleteBrowsingHistoryCheckboxes", |
| 224 !Profile::FromWebUI(web_ui())->IsSupervised()); | 224 !Profile::FromWebUI(web_ui())->IsSupervised()); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void ClearBrowserDataHandler::RegisterMessages() { | 227 void ClearBrowserDataHandler::RegisterMessages() { |
| 228 // Setup handlers specific to this panel. | 228 // Setup handlers specific to this panel. |
| 229 web_ui()->RegisterMessageCallback("performClearBrowserData", | 229 web_ui()->RegisterMessageCallback("performClearBrowserData", |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", | 423 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", |
| 424 should_show_history_notice_); | 424 should_show_history_notice_); |
| 425 } | 425 } |
| 426 | 426 |
| 427 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { | 427 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { |
| 428 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). | 428 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). |
| 429 should_show_history_deletion_dialog_ = show; | 429 should_show_history_deletion_dialog_ = show; |
| 430 } | 430 } |
| 431 | 431 |
| 432 } // namespace options | 432 } // namespace options |
| OLD | NEW |