| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/appcache/appcache_service.h" | 5 #include "webkit/appcache/appcache_service.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "webkit/appcache/appcache_backend_impl.h" | 10 #include "webkit/appcache/appcache_backend_impl.h" |
| 11 #include "webkit/appcache/appcache_entry.h" | 11 #include "webkit/appcache/appcache_entry.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 class AppCacheService::CanHandleOfflineHelper : AsyncHelper { | 67 class AppCacheService::CanHandleOfflineHelper : AsyncHelper { |
| 68 public: | 68 public: |
| 69 CanHandleOfflineHelper( | 69 CanHandleOfflineHelper( |
| 70 AppCacheService* service, const GURL& url, | 70 AppCacheService* service, const GURL& url, |
| 71 net::CompletionCallback* callback) | 71 net::CompletionCallback* callback) |
| 72 : AsyncHelper(service, callback), url_(url) { | 72 : AsyncHelper(service, callback), url_(url) { |
| 73 } | 73 } |
| 74 | 74 |
| 75 virtual void Start() { | 75 virtual void Start() { |
| 76 service_->storage()->FindResponseForMainRequest(url_, this); | 76 service_->storage()->FindResponseForMainRequest(url_, GURL(), this); |
| 77 } | 77 } |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 // AppCacheStorage::Delegate override | 80 // AppCacheStorage::Delegate override |
| 81 virtual void OnMainResponseFound( | 81 virtual void OnMainResponseFound( |
| 82 const GURL& url, const AppCacheEntry& entry, | 82 const GURL& url, const AppCacheEntry& entry, |
| 83 const GURL& fallback_url, const AppCacheEntry& fallback_entry, | 83 const GURL& fallback_url, const AppCacheEntry& fallback_entry, |
| 84 int64 cache_id, const GURL& mainfest_url, | 84 int64 cache_id, const GURL& mainfest_url, |
| 85 bool was_blocked_by_policy); | 85 bool was_blocked_by_policy); |
| 86 | 86 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 backends_.insert( | 227 backends_.insert( |
| 228 BackendMap::value_type(backend_impl->process_id(), backend_impl)); | 228 BackendMap::value_type(backend_impl->process_id(), backend_impl)); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void AppCacheService::UnregisterBackend( | 231 void AppCacheService::UnregisterBackend( |
| 232 AppCacheBackendImpl* backend_impl) { | 232 AppCacheBackendImpl* backend_impl) { |
| 233 backends_.erase(backend_impl->process_id()); | 233 backends_.erase(backend_impl->process_id()); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace appcache | 236 } // namespace appcache |
| OLD | NEW |