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

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: fix .classpath file Created 3 years, 10 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 web_ui()->CallJavascriptFunctionUnsafe( 370 web_ui()->CallJavascriptFunctionUnsafe(
371 "ClearBrowserDataOverlay.setAllowDeletingHistory", 371 "ClearBrowserDataOverlay.setAllowDeletingHistory",
372 base::FundamentalValue(*allow_deleting_browser_history_)); 372 base::FundamentalValue(*allow_deleting_browser_history_));
373 } 373 }
374 374
375 void ClearBrowserDataHandler::AddCounter( 375 void ClearBrowserDataHandler::AddCounter(
376 std::unique_ptr<browsing_data::BrowsingDataCounter> counter) { 376 std::unique_ptr<browsing_data::BrowsingDataCounter> counter) {
377 DCHECK(AreCountersEnabled()); 377 DCHECK(AreCountersEnabled());
378 378
379 counter->Init(Profile::FromWebUI(web_ui())->GetPrefs(), 379 counter->Init(Profile::FromWebUI(web_ui())->GetPrefs(),
380 browsing_data::ClearBrowsingDataPreferenceType::DEFAULT,
380 base::Bind(&ClearBrowserDataHandler::UpdateCounterText, 381 base::Bind(&ClearBrowserDataHandler::UpdateCounterText,
381 base::Unretained(this))); 382 base::Unretained(this)));
382 counters_.push_back(std::move(counter)); 383 counters_.push_back(std::move(counter));
383 } 384 }
384 385
385 void ClearBrowserDataHandler::UpdateCounterText( 386 void ClearBrowserDataHandler::UpdateCounterText(
386 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 387 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
387 DCHECK(AreCountersEnabled()); 388 DCHECK(AreCountersEnabled());
388 web_ui()->CallJavascriptFunctionUnsafe( 389 web_ui()->CallJavascriptFunctionUnsafe(
389 "ClearBrowserDataOverlay.updateCounter", 390 "ClearBrowserDataOverlay.updateCounter",
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated", 430 "History.ClearBrowsingData.HistoryNoticeShownInFooterWhenUpdated",
430 should_show_history_notice_); 431 should_show_history_notice_);
431 } 432 }
432 433
433 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) { 434 void ClearBrowserDataHandler::UpdateHistoryDeletionDialog(bool show) {
434 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes). 435 // This is used by OnBrowsingDataRemoverDone (when the deletion finishes).
435 should_show_history_deletion_dialog_ = show; 436 should_show_history_deletion_dialog_ = show;
436 } 437 }
437 438
438 } // namespace options 439 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698