summaryrefslogtreecommitdiffstats
path: root/webkit/appcache
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 19:34:10 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-26 19:34:10 +0000
commit5efb5e31a219214f9c468f15ee24e92ceb8b7086 (patch)
tree5b13373e40e52467bff89ede9f3f94fb55cf3f92 /webkit/appcache
parent42903e2dc6c9a89752e55cfd9a3b1270f3ecb974 (diff)
downloadchromium_src-5efb5e31a219214f9c468f15ee24e92ceb8b7086.zip
chromium_src-5efb5e31a219214f9c468f15ee24e92ceb8b7086.tar.gz
chromium_src-5efb5e31a219214f9c468f15ee24e92ceb8b7086.tar.bz2
Handle the case where the 'host' param is empty in AppCacheQuotaClient::GetOriginsForHost().
Review URL: http://codereview.chromium.org/7480022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache')
-rw-r--r--webkit/appcache/appcache_quota_client.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_quota_client.cc b/webkit/appcache/appcache_quota_client.cc
index f41897d..14bdb2b 100644
--- a/webkit/appcache/appcache_quota_client.cc
+++ b/webkit/appcache/appcache_quota_client.cc
@@ -101,7 +101,12 @@ void AppCacheQuotaClient::GetOriginsForHost(
quota::StorageType type,
const std::string& host,
GetOriginsCallback* callback_ptr) {
- DCHECK(!host.empty());
+ DCHECK(callback_ptr);
+ if (host.empty()) {
+ callback_ptr->Run(std::set<GURL>());
+ delete callback_ptr;
+ return;
+ }
GetOriginsHelper(type, host, callback_ptr);
}