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

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

Issue 124183002: Implement delete methods for the various CannedBrowsingDataHelpers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/browsing_data_file_system_helper.cc
diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
index 49b68d9acc3b80d598a24d28925a32f6fecb9fcd..62c7ee453951bd247ca6a8a6534cb980b683a19f 100644
--- a/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_file_system_helper.cc
@@ -7,7 +7,6 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -255,20 +254,8 @@ size_t CannedBrowsingDataFileSystemHelper::GetFileSystemCount() const {
void CannedBrowsingDataFileSystemHelper::StartFetching(
const base::Callback<void(const std::list<FileSystemInfo>&)>& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(!is_fetching_);
- DCHECK_EQ(false, callback.is_null());
- is_fetching_ = true;
- completion_callback_ = callback;
+ DCHECK(!callback.is_null());
BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(&CannedBrowsingDataFileSystemHelper::NotifyOnUIThread, this));
-}
-
-void CannedBrowsingDataFileSystemHelper::NotifyOnUIThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(is_fetching_);
- completion_callback_.Run(file_system_info_);
- completion_callback_.Reset();
- is_fetching_ = false;
+ BrowserThread::UI, FROM_HERE, base::Bind(callback, file_system_info_));
}

Powered by Google App Engine
This is Rietveld 408576698