Chromium Code Reviews| Index: net/disk_cache/simple/simple_backend_impl.h |
| diff --git a/net/disk_cache/simple/simple_backend_impl.h b/net/disk_cache/simple/simple_backend_impl.h |
| index 0c7ba8cf8cb762991f178e97eb60bf0fcbf78dfd..132b90af89fe835bfac4067457b2d66e9849d09a 100644 |
| --- a/net/disk_cache/simple/simple_backend_impl.h |
| +++ b/net/disk_cache/simple/simple_backend_impl.h |
| @@ -15,6 +15,10 @@ |
| #include "net/base/cache_type.h" |
| #include "net/disk_cache/disk_cache.h" |
| +namespace base { |
| +class MessageLoopProxy; |
| +} |
| + |
| namespace disk_cache { |
| // SimpleBackendImpl is a new cache backend that stores entries in individual |
| @@ -34,7 +38,7 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend { |
| const scoped_refptr<base::TaskRunner>& cache_thread, |
| net::NetLog* net_log); |
| - int Init(const CompletionCallback& callback); |
| + int Init(const CompletionCallback& completition_callback); |
|
gavinp
2013/04/11 09:56:32
Nit: spelling (in the method too).
felipeg
2013/04/11 11:25:45
Done.
|
| virtual ~SimpleBackendImpl(); |
| @@ -61,12 +65,16 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend { |
| virtual void OnExternalCacheHit(const std::string& key) OVERRIDE; |
| private: |
| - // Must run on Cache Thread. |
| - void InitializeIndex(base::MessageLoopProxy* io_thread, |
| - const CompletionCallback& callback); |
| + typedef base::Callback<void(int)> InitializeIndexCallback; |
|
gavinp
2013/04/11 09:56:32
How about naming the int? Call it "result" or io_r
felipeg
2013/04/11 11:25:45
Done.
|
| - const base::FilePath path_; |
| + void InitializeIndex(const CompletionCallback& callback, int rv); |
|
pasko-google - do not use
2013/04/10 17:51:01
Should probably comment that this should run on th
felipeg
2013/04/11 09:41:35
Done.
gavinp
2013/04/11 09:56:32
Does every method on this class now run on the IO
gavinp
2013/04/11 09:56:32
rv isn't a good name for an argument; it's more t
felipeg
2013/04/11 11:25:45
Done.
|
| + static void CreateDirectory( |
|
pasko-google - do not use
2013/04/10 17:51:01
I would rather call it EnsureDirectoryConsistent()
felipeg
2013/04/11 09:41:35
Done.
|
| + base::MessageLoopProxy* io_thread, |
| + const base::FilePath& path, |
| + const InitializeIndexCallback& initialize_index_callback); |
| + |
| + const base::FilePath path_; |
| scoped_ptr<SimpleIndex> index_; |
| const scoped_refptr<base::TaskRunner> cache_thread_; |
| }; |