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

Unified Diff: chrome/browser/browsing_data/cache_counter_browsertest.cc

Issue 1420013004: Polish the result communication and display of the browsing data counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/cache_counter_browsertest.cc
diff --git a/chrome/browser/browsing_data/cache_counter_browsertest.cc b/chrome/browser/browsing_data/cache_counter_browsertest.cc
index a156c73d7aa58edb5ac041bd1a823334a31a88cc..cc081a7f662b6f41891e992ec0597f2aa0741c56 100644
--- a/chrome/browser/browsing_data/cache_counter_browsertest.cc
+++ b/chrome/browser/browsing_data/cache_counter_browsertest.cc
@@ -129,11 +129,13 @@ class CacheCounterTest : public InProcessBrowserTest {
}
// Callback from the counter.
- void CountingCallback(bool finished, BrowsingDataCounter::ResultInt count) {
+ void CountingCallback(scoped_ptr<BrowsingDataCounter::Result> result) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- finished_ = finished;
- result_ = count;
- if (run_loop_ && finished)
+
+ finished_ = result->Finished();
+ result_ = result->Value();
Bernhard Bauer 2015/11/03 11:37:02 ...aand this would crash now, no?
msramek 2015/11/03 11:57:06 Hm :/ If I need to guard access to Value() with Fi
Bernhard Bauer 2015/11/03 12:07:08 Or store the result instead of the two values.
msramek 2015/11/03 13:15:39 If I store it as a Result, I'll still have to do t
+
+ if (run_loop_ && finished_)
run_loop_->Quit();
}

Powered by Google App Engine
This is Rietveld 408576698