| 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 <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 text = l10n_util::GetStringFUTF16(IDS_CLEAR_BROWSING_DATA_INFO_BAR_TEXT, | 144 text = l10n_util::GetStringFUTF16(IDS_CLEAR_BROWSING_DATA_INFO_BAR_TEXT, |
| 145 acc.GetShortcutText()); | 145 acc.GetShortcutText()); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 web_ui()->CallJavascriptFunctionUnsafe( | 149 web_ui()->CallJavascriptFunctionUnsafe( |
| 150 "ClearBrowserDataOverlay.setBannerText", base::StringValue(text)); | 150 "ClearBrowserDataOverlay.setBannerText", base::StringValue(text)); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void ClearBrowserDataHandler::OnPageOpened(const base::ListValue* value) { | 153 void ClearBrowserDataHandler::OnPageOpened(const base::ListValue* value) { |
| 154 for (browsing_data::BrowsingDataCounter* counter : counters_) { | 154 for (const auto& counter : counters_) { |
| 155 DCHECK(AreCountersEnabled()); | 155 DCHECK(AreCountersEnabled()); |
| 156 counter->Restart(); | 156 counter->Restart(); |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 void ClearBrowserDataHandler::GetLocalizedValues( | 160 void ClearBrowserDataHandler::GetLocalizedValues( |
| 161 base::DictionaryValue* localized_strings) { | 161 base::DictionaryValue* localized_strings) { |
| 162 DCHECK(localized_strings); | 162 DCHECK(localized_strings); |
| 163 | 163 |
| 164 static OptionsStringResource resources[] = { | 164 static OptionsStringResource resources[] = { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", | 426 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", |
| 427 should_show_history_notice_); | 427 should_show_history_notice_); |
| 428 } | 428 } |
| 429 | 429 |
| 430 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { | 430 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { |
| 431 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). | 431 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). |
| 432 should_show_history_deletion_dialog_ = show; | 432 should_show_history_deletion_dialog_ = show; |
| 433 } | 433 } |
| 434 | 434 |
| 435 } // namespace options | 435 } // namespace options |
| OLD | NEW |