| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/appcache/appcache_quota_client.h" | 5 #include "content/browser/appcache/appcache_quota_client.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 if (type != storage::kStorageTypeTemporary) { | 178 if (type != storage::kStorageTypeTemporary) { |
| 179 callback.Run(std::set<GURL>()); | 179 callback.Run(std::set<GURL>()); |
| 180 return; | 180 return; |
| 181 } | 181 } |
| 182 | 182 |
| 183 const AppCacheStorage::UsageMap* map = GetUsageMap(); | 183 const AppCacheStorage::UsageMap* map = GetUsageMap(); |
| 184 std::set<GURL> origins; | 184 std::set<GURL> origins; |
| 185 for (AppCacheStorage::UsageMap::const_iterator iter = map->begin(); | 185 for (AppCacheStorage::UsageMap::const_iterator iter = map->begin(); |
| 186 iter != map->end(); ++iter) { | 186 iter != map->end(); ++iter) { |
| 187 if (opt_host.empty() || iter->first.host() == opt_host) | 187 if (opt_host.empty() || iter->first.host_piece() == opt_host) |
| 188 origins.insert(iter->first); | 188 origins.insert(iter->first); |
| 189 } | 189 } |
| 190 callback.Run(origins); | 190 callback.Run(origins); |
| 191 } | 191 } |
| 192 | 192 |
| 193 void AppCacheQuotaClient::ProcessPendingRequests() { | 193 void AppCacheQuotaClient::ProcessPendingRequests() { |
| 194 DCHECK(appcache_is_ready_); | 194 DCHECK(appcache_is_ready_); |
| 195 while (!pending_batch_requests_.empty()) | 195 while (!pending_batch_requests_.empty()) |
| 196 RunFront(&pending_batch_requests_); | 196 RunFront(&pending_batch_requests_); |
| 197 | 197 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 current_delete_request_callback_.Run(storage::kQuotaErrorAbort); | 242 current_delete_request_callback_.Run(storage::kQuotaErrorAbort); |
| 243 current_delete_request_callback_.Reset(); | 243 current_delete_request_callback_.Reset(); |
| 244 GetServiceDeleteCallback()->Cancel(); | 244 GetServiceDeleteCallback()->Cancel(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 if (quota_manager_is_destroyed_) | 247 if (quota_manager_is_destroyed_) |
| 248 delete this; | 248 delete this; |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace content | 251 } // namespace content |
| OLD | NEW |