summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_file_system_helper.cc
diff options
context:
space:
mode:
authormkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 13:28:01 +0000
committermkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 13:28:01 +0000
commit45267a9d51bd55c66f60c0662aec66a7a4f1db6a (patch)
tree63553a7190bafb29cabede8a97cae57dda67649b /chrome/browser/browsing_data_file_system_helper.cc
parentb4dbcb7a2ca63b975cfa051f0836f5a98c172f03 (diff)
downloadchromium_src-45267a9d51bd55c66f60c0662aec66a7a4f1db6a.zip
chromium_src-45267a9d51bd55c66f60c0662aec66a7a4f1db6a.tar.gz
chromium_src-45267a9d51bd55c66f60c0662aec66a7a4f1db6a.tar.bz2
Fixing addr4 errors in BrowsingDataFileSystemHelper
* Adding a non-empty implementation of CancelNotification(). * reverting 87060 BUG=84226 TEST=Check that Valgrind loves me again. Review URL: http://codereview.chromium.org/7062051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87299 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_file_system_helper.cc')
-rw-r--r--chrome/browser/browsing_data_file_system_helper.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/chrome/browser/browsing_data_file_system_helper.cc b/chrome/browser/browsing_data_file_system_helper.cc
index 4875133..1c61cf3 100644
--- a/chrome/browser/browsing_data_file_system_helper.cc
+++ b/chrome/browser/browsing_data_file_system_helper.cc
@@ -89,7 +89,7 @@ void BrowsingDataFileSystemHelperImpl::StartFetching(
void BrowsingDataFileSystemHelperImpl::CancelNotification() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- completion_callback_.reset(NULL);
+ completion_callback_.reset();
}
void BrowsingDataFileSystemHelperImpl::DeleteFileSystemOrigin(
@@ -238,6 +238,7 @@ bool CannedBrowsingDataFileSystemHelper::empty() const {
void CannedBrowsingDataFileSystemHelper::StartFetching(
Callback1<const std::vector<FileSystemInfo>& >::Type* callback) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!is_fetching_);
DCHECK(callback);
is_fetching_ = true;
@@ -275,11 +276,17 @@ void CannedBrowsingDataFileSystemHelper::StartFetching(
}
pending_file_system_info_.clear();
- MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this,
- &CannedBrowsingDataFileSystemHelper::Notify));
+// MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this,
+// &CannedBrowsingDataFileSystemHelper::Notify));
+
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ NewRunnableMethod(
+ this, &CannedBrowsingDataFileSystemHelper::Notify));
}
void CannedBrowsingDataFileSystemHelper::Notify() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(is_fetching_);
if (completion_callback_ != NULL) {
completion_callback_->Run(file_system_info_);
@@ -287,3 +294,8 @@ void CannedBrowsingDataFileSystemHelper::Notify() {
}
is_fetching_ = false;
}
+
+void CannedBrowsingDataFileSystemHelper::CancelNotification() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ completion_callback_.reset();
+}