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

Unified Diff: webkit/quota/quota_manager.cc

Issue 9419033: Move creation of BrowserContext objects that live in content to content, instead of depending on th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix memory leaks in tests Created 8 years, 10 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
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/quota_manager.cc
===================================================================
--- webkit/quota/quota_manager.cc (revision 122721)
+++ webkit/quota/quota_manager.cc (working copy)
@@ -1137,7 +1137,6 @@
}
QuotaManager::~QuotaManager() {
- DCHECK(io_thread_->BelongsToCurrentThread());
proxy_->manager_ = NULL;
std::for_each(clients_.begin(), clients_.end(),
std::mem_fun(&QuotaClient::OnQuotaManagerDestroyed));
@@ -1297,7 +1296,6 @@
}
void QuotaManager::RegisterClient(QuotaClient* client) {
- DCHECK(io_thread_->BelongsToCurrentThread());
DCHECK(!database_.get());
clients_.push_back(client);
}
@@ -1674,8 +1672,8 @@
}
void QuotaManager::DeleteOnCorrectThread() const {
- if (!io_thread_->BelongsToCurrentThread()) {
- io_thread_->DeleteSoon(FROM_HERE, this);
+ if (!io_thread_->BelongsToCurrentThread() &&
+ io_thread_->DeleteSoon(FROM_HERE, this)) {
return;
}
delete this;
@@ -1684,10 +1682,10 @@
// QuotaManagerProxy ----------------------------------------------------------
void QuotaManagerProxy::RegisterClient(QuotaClient* client) {
- if (!io_thread_->BelongsToCurrentThread()) {
- io_thread_->PostTask(
- FROM_HERE,
- base::Bind(&QuotaManagerProxy::RegisterClient, this, client));
+ if (!io_thread_->BelongsToCurrentThread() &&
+ io_thread_->PostTask(
+ FROM_HERE,
+ base::Bind(&QuotaManagerProxy::RegisterClient, this, client))) {
return;
}
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698