| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
| 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // It is currently a work in progress, missing many features of a real cache, | 23 // It is currently a work in progress, missing many features of a real cache, |
| 24 // such as eviction. | 24 // such as eviction. |
| 25 | 25 |
| 26 // See http://www.chromium.org/developers/design-documents/network-stack/disk-ca
che/very-simple-backend | 26 // See http://www.chromium.org/developers/design-documents/network-stack/disk-ca
che/very-simple-backend |
| 27 | 27 |
| 28 class SimpleBackendImpl : public Backend { | 28 class SimpleBackendImpl : public Backend { |
| 29 public: | 29 public: |
| 30 virtual ~SimpleBackendImpl(); | 30 virtual ~SimpleBackendImpl(); |
| 31 | 31 |
| 32 static int CreateBackend(const base::FilePath& full_path, | 32 static int CreateBackend(const base::FilePath& full_path, |
| 33 bool force, | |
| 34 int max_bytes, | 33 int max_bytes, |
| 35 net::CacheType type, | 34 net::CacheType type, |
| 36 uint32 flags, | 35 uint32 flags, |
| 37 scoped_refptr<base::TaskRunner> thread, | 36 scoped_refptr<base::TaskRunner> thread, |
| 38 net::NetLog* net_log, | 37 net::NetLog* net_log, |
| 39 Backend** backend, | 38 Backend** backend, |
| 40 const CompletionCallback& callback); | 39 const CompletionCallback& callback); |
| 41 | 40 |
| 42 // From Backend: | 41 // From Backend: |
| 43 virtual net::CacheType GetCacheType() const OVERRIDE; | 42 virtual net::CacheType GetCacheType() const OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const base::FilePath& path, | 77 const base::FilePath& path, |
| 79 const CompletionCallback& callback, | 78 const CompletionCallback& callback, |
| 80 Backend** backend); | 79 Backend** backend); |
| 81 | 80 |
| 82 const base::FilePath path_; | 81 const base::FilePath path_; |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 } // namespace disk_cache | 84 } // namespace disk_cache |
| 86 | 85 |
| 87 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 86 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
| OLD | NEW |