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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: remove mock code 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/settings/settings_clear_browsing_data_handler. h" 5 #include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler. h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 void ClearBrowsingDataHandler::UpdateHistoryDeletionDialog(bool show) { 314 void ClearBrowsingDataHandler::UpdateHistoryDeletionDialog(bool show) {
315 // This is used by OnClearingTaskFinished (when the deletion finishes). 315 // This is used by OnClearingTaskFinished (when the deletion finishes).
316 show_history_deletion_dialog_ = show; 316 show_history_deletion_dialog_ = show;
317 } 317 }
318 318
319 void ClearBrowsingDataHandler::AddCounter( 319 void ClearBrowsingDataHandler::AddCounter(
320 std::unique_ptr<browsing_data::BrowsingDataCounter> counter) { 320 std::unique_ptr<browsing_data::BrowsingDataCounter> counter) {
321 counter->Init(profile_->GetPrefs(), 321 counter->Init(profile_->GetPrefs(),
322 browsing_data::ClearBrowsingDataTab::ADVANCED,
322 base::Bind(&ClearBrowsingDataHandler::UpdateCounterText, 323 base::Bind(&ClearBrowsingDataHandler::UpdateCounterText,
323 base::Unretained(this))); 324 base::Unretained(this)));
324 counters_.push_back(std::move(counter)); 325 counters_.push_back(std::move(counter));
325 } 326 }
326 327
327 void ClearBrowsingDataHandler::UpdateCounterText( 328 void ClearBrowsingDataHandler::UpdateCounterText(
328 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 329 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
329 CallJavascriptFunction( 330 CallJavascriptFunction(
330 "cr.webUIListenerCallback", 331 "cr.webUIListenerCallback", base::StringValue("update-counter-text"),
331 base::StringValue("update-counter-text"),
332 base::StringValue(result->source()->GetPrefName()), 332 base::StringValue(result->source()->GetPrefName()),
333 base::StringValue(GetChromeCounterTextFromResult(result.get()))); 333 base::StringValue(GetChromeCounterTextFromResult(result.get())));
334 } 334 }
335 335
336 } // namespace settings 336 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698