| OLD | NEW | 
|    1 // Copyright (c) 2011 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/browser/appcache/mock_appcache_storage.h" |    5 #include "webkit/browser/appcache/mock_appcache_storage.h" | 
|    6  |    6  | 
|    7 #include "base/bind.h" |    7 #include "base/bind.h" | 
|    8 #include "base/logging.h" |    8 #include "base/logging.h" | 
|    9 #include "base/memory/ref_counted.h" |    9 #include "base/memory/ref_counted.h" | 
|   10 #include "base/message_loop.h" |   10 #include "base/message_loop/message_loop.h" | 
|   11 #include "base/stl_util.h" |   11 #include "base/stl_util.h" | 
|   12 #include "webkit/browser/appcache/appcache.h" |   12 #include "webkit/browser/appcache/appcache.h" | 
|   13 #include "webkit/browser/appcache/appcache_entry.h" |   13 #include "webkit/browser/appcache/appcache_entry.h" | 
|   14 #include "webkit/browser/appcache/appcache_group.h" |   14 #include "webkit/browser/appcache/appcache_group.h" | 
|   15 #include "webkit/browser/appcache/appcache_response.h" |   15 #include "webkit/browser/appcache/appcache_response.h" | 
|   16 #include "webkit/browser/appcache/appcache_service.h" |   16 #include "webkit/browser/appcache/appcache_service.h" | 
|   17  |   17  | 
|   18 // This is a quick and easy 'mock' implementation of the storage interface |   18 // This is a quick and easy 'mock' implementation of the storage interface | 
|   19 // that doesn't put anything to disk. |   19 // that doesn't put anything to disk. | 
|   20 // |   20 // | 
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  528 bool MockAppCacheStorage::ShouldCacheLoadAppearAsync(const AppCache* cache) { |  528 bool MockAppCacheStorage::ShouldCacheLoadAppearAsync(const AppCache* cache) { | 
|  529   if (!cache) |  529   if (!cache) | 
|  530     return true; |  530     return true; | 
|  531  |  531  | 
|  532   // If the 'stored' ref is the only ref, real storage will have to load from |  532   // If the 'stored' ref is the only ref, real storage will have to load from | 
|  533   // the database. |  533   // the database. | 
|  534   return IsCacheStored(cache) && cache->HasOneRef(); |  534   return IsCacheStored(cache) && cache->HasOneRef(); | 
|  535 } |  535 } | 
|  536  |  536  | 
|  537 }  // namespace appcache |  537 }  // namespace appcache | 
| OLD | NEW |