Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(927)

Side by Side Diff: chrome/browser/ui/webui/options/clear_browser_data_handler.cc

Issue 2730703003: Change CBD layout and texts (Closed)
Patch Set: add browsertest for checkbox summaries Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 base::Unretained(this))); 380 base::Unretained(this)));
381 counters_.push_back(std::move(counter)); 381 counters_.push_back(std::move(counter));
382 } 382 }
383 383
384 void ClearBrowserDataHandler::UpdateCounterText( 384 void ClearBrowserDataHandler::UpdateCounterText(
385 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 385 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
386 DCHECK(AreCountersEnabled()); 386 DCHECK(AreCountersEnabled());
387 web_ui()->CallJavascriptFunctionUnsafe( 387 web_ui()->CallJavascriptFunctionUnsafe(
388 "ClearBrowserDataOverlay.updateCounter", 388 "ClearBrowserDataOverlay.updateCounter",
389 base::Value(result->source()->GetPrefName()), 389 base::Value(result->source()->GetPrefName()),
390 base::Value(GetChromeCounterTextFromResult(result.get()))); 390 base::Value(GetChromeCounterTextFromResult(
391 result.get(), browsing_data::ClearBrowsingDataTab::ADVANCED)));
391 } 392 }
392 393
393 void ClearBrowserDataHandler::OnStateChanged(syncer::SyncService* sync) { 394 void ClearBrowserDataHandler::OnStateChanged(syncer::SyncService* sync) {
394 UpdateSyncState(); 395 UpdateSyncState();
395 } 396 }
396 397
397 void ClearBrowserDataHandler::UpdateSyncState() { 398 void ClearBrowserDataHandler::UpdateSyncState() {
398 web_ui()->CallJavascriptFunctionUnsafe( 399 web_ui()->CallJavascriptFunctionUnsafe(
399 "ClearBrowserDataOverlay.updateSyncWarningAndHistoryFooter", 400 "ClearBrowserDataOverlay.updateSyncWarningAndHistoryFooter",
400 base::Value(sync_service_ && sync_service_->IsSyncActive()), 401 base::Value(sync_service_ && sync_service_->IsSyncActive()),
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", 433 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated",
433 should_show_history_notice_); 434 should_show_history_notice_);
434 } 435 }
435 436
436 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { 437 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) {
437 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). 438 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes).
438 should_show_history_deletion_dialog_ = show; 439 should_show_history_deletion_dialog_ = show;
439 } 440 }
440 441
441 } // namespace options 442 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698