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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 base::Unretained(this))); | 376 base::Unretained(this))); |
377 counters_.push_back(std::move(counter)); | 377 counters_.push_back(std::move(counter)); |
378 } | 378 } |
379 | 379 |
380 void ClearBrowserDataHandler::UpdateCounterText( | 380 void ClearBrowserDataHandler::UpdateCounterText( |
381 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { | 381 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { |
382 DCHECK(AreCountersEnabled()); | 382 DCHECK(AreCountersEnabled()); |
383 web_ui()->CallJavascriptFunctionUnsafe( | 383 web_ui()->CallJavascriptFunctionUnsafe( |
384 "ClearBrowserDataOverlay.updateCounter", | 384 "ClearBrowserDataOverlay.updateCounter", |
385 base::StringValue(result->source()->GetPrefName()), | 385 base::StringValue(result->source()->GetPrefName()), |
386 base::StringValue(GetCounterTextFromResult(result.get()))); | 386 base::StringValue(GetChromeCounterTextFromResult(result.get()))); |
387 } | 387 } |
388 | 388 |
389 void ClearBrowserDataHandler::OnStateChanged() { | 389 void ClearBrowserDataHandler::OnStateChanged() { |
390 web_ui()->CallJavascriptFunctionUnsafe( | 390 web_ui()->CallJavascriptFunctionUnsafe( |
391 "ClearBrowserDataOverlay.updateSyncWarningAndHistoryFooter", | 391 "ClearBrowserDataOverlay.updateSyncWarningAndHistoryFooter", |
392 base::FundamentalValue(sync_service_ && sync_service_->IsSyncActive()), | 392 base::FundamentalValue(sync_service_ && sync_service_->IsSyncActive()), |
393 base::FundamentalValue(should_show_history_notice_)); | 393 base::FundamentalValue(should_show_history_notice_)); |
394 } | 394 } |
395 | 395 |
396 void ClearBrowserDataHandler::RefreshHistoryNotice() { | 396 void ClearBrowserDataHandler::RefreshHistoryNotice() { |
(...skipping 27 matching lines...) Expand all Loading... |
424 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", | 424 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", |
425 should_show_history_notice_); | 425 should_show_history_notice_); |
426 } | 426 } |
427 | 427 |
428 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { | 428 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { |
429 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). | 429 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). |
430 should_show_history_deletion_dialog_ = show; | 430 should_show_history_deletion_dialog_ = show; |
431 } | 431 } |
432 | 432 |
433 } // namespace options | 433 } // namespace options |
OLD | NEW |