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

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

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: rebase and fix compilation 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 web_ui()->CallJavascriptFunctionUnsafe( 368 web_ui()->CallJavascriptFunctionUnsafe(
369 "ClearBrowserDataOverlay.setAllowDeletingHistory", 369 "ClearBrowserDataOverlay.setAllowDeletingHistory",
370 base::Value(*allow_deleting_browser_history_)); 370 base::Value(*allow_deleting_browser_history_));
371 } 371 }
372 372
373 void ClearBrowserDataHandler::AddCounter( 373 void ClearBrowserDataHandler::AddCounter(
374 std::unique_ptr<browsing_data::BrowsingDataCounter> counter) { 374 std::unique_ptr<browsing_data::BrowsingDataCounter> counter) {
375 DCHECK(AreCountersEnabled()); 375 DCHECK(AreCountersEnabled());
376 376
377 counter->Init(Profile::FromWebUI(web_ui())->GetPrefs(), 377 counter->Init(Profile::FromWebUI(web_ui())->GetPrefs(),
378 browsing_data::ClearBrowsingDataTab::ADVANCED,
378 base::Bind(&ClearBrowserDataHandler::UpdateCounterText, 379 base::Bind(&ClearBrowserDataHandler::UpdateCounterText,
379 base::Unretained(this))); 380 base::Unretained(this)));
380 counters_.push_back(std::move(counter)); 381 counters_.push_back(std::move(counter));
381 } 382 }
382 383
383 void ClearBrowserDataHandler::UpdateCounterText( 384 void ClearBrowserDataHandler::UpdateCounterText(
384 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 385 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
385 DCHECK(AreCountersEnabled()); 386 DCHECK(AreCountersEnabled());
386 web_ui()->CallJavascriptFunctionUnsafe( 387 web_ui()->CallJavascriptFunctionUnsafe(
387 "ClearBrowserDataOverlay.updateCounter", 388 "ClearBrowserDataOverlay.updateCounter",
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", 432 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated",
432 should_show_history_notice_); 433 should_show_history_notice_);
433 } 434 }
434 435
435 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { 436 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) {
436 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). 437 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes).
437 should_show_history_deletion_dialog_ = show; 438 should_show_history_deletion_dialog_ = show;
438 } 439 }
439 440
440 } // namespace options 441 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698