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

Side by Side Diff: ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.h" 5 #include "ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "components/prefs/pref_service.h" 9 #include "components/prefs/pref_service.h"
10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
(...skipping 20 matching lines...) Expand all
31 31
32 void BrowsingDataCounterWrapper::RestartCounter() { 32 void BrowsingDataCounterWrapper::RestartCounter() {
33 counter_->Restart(); 33 counter_->Restart();
34 } 34 }
35 35
36 BrowsingDataCounterWrapper::BrowsingDataCounterWrapper( 36 BrowsingDataCounterWrapper::BrowsingDataCounterWrapper(
37 std::unique_ptr<browsing_data::BrowsingDataCounter> counter, 37 std::unique_ptr<browsing_data::BrowsingDataCounter> counter,
38 PrefService* pref_service, 38 PrefService* pref_service,
39 const UpdateUICallback& update_ui_callback) 39 const UpdateUICallback& update_ui_callback)
40 : counter_(std::move(counter)), update_ui_callback_(update_ui_callback) { 40 : counter_(std::move(counter)), update_ui_callback_(update_ui_callback) {
41 counter_->Init(pref_service, 41 counter_->Init(pref_service, browsing_data::ClearBrowsingDataTab::ADVANCED,
42 base::Bind(&BrowsingDataCounterWrapper::UpdateWithResult, 42 base::Bind(&BrowsingDataCounterWrapper::UpdateWithResult,
43 base::Unretained(this))); 43 base::Unretained(this)));
44 } 44 }
45 45
46 void BrowsingDataCounterWrapper::UpdateWithResult( 46 void BrowsingDataCounterWrapper::UpdateWithResult(
47 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 47 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
48 update_ui_callback_.Run(*result.get()); 48 update_ui_callback_.Run(*result.get());
49 } 49 }
OLDNEW
« no previous file with comments | « ios/chrome/app/main_controller.mm ('k') | ios/chrome/browser/browsing_data/browsing_data_removal_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698