Chromium Code Reviews| Index: net/disk_cache/simple/simple_index.h |
| diff --git a/net/disk_cache/simple/simple_index.h b/net/disk_cache/simple/simple_index.h |
| index 2347aa9a3d41cd8540d9d975f53facf0c8664b9e..4fbf3e6eebf1ed3c91744aa719863c70e247aedf 100644 |
| --- a/net/disk_cache/simple/simple_index.h |
| +++ b/net/disk_cache/simple/simple_index.h |
| @@ -23,6 +23,10 @@ |
| #include "net/base/completion_callback.h" |
| #include "net/base/net_export.h" |
| +#if defined(OS_ANDROID) |
| +#include "base/android/activity_status.h" |
| +#endif |
| + |
| class Pickle; |
| class PickleIterator; |
| @@ -72,7 +76,8 @@ class NET_EXPORT_PRIVATE EntryMetadata { |
| // This class is not Thread-safe. |
| class NET_EXPORT_PRIVATE SimpleIndex |
| - : public base::SupportsWeakPtr<SimpleIndex> { |
| + : public base::SupportsWeakPtr<SimpleIndex> |
|
Philippe
2013/05/03 10:11:47
Nit: the brace was happy there :)
gavinp
2013/05/03 12:16:53
Done.
|
| +{ |
| public: |
| SimpleIndex(base::SingleThreadTaskRunner* cache_thread, |
| base::SingleThreadTaskRunner* io_thread, |
| @@ -154,7 +159,16 @@ class NET_EXPORT_PRIVATE SimpleIndex |
| void MergeInitializingSet(scoped_ptr<EntrySet> index_file_entries, |
| bool force_index_flush); |
| +#if defined(OS_ANDROID) |
| + void OnActivityStateChange(base::android::ActivityState state); |
| +#endif |
| + |
| EntrySet entries_set_; |
| + |
| +#if defined(OS_ANDROID) |
|
felipeg
2013/05/03 10:03:00
I know it would mix member vars with functions, bu
gavinp
2013/05/03 12:16:53
Done.
|
| + base::android::ActivityStatus::Listener activity_status_listener_; |
| +#endif |
| + |
| uint64 cache_size_; // Total cache storage size in bytes. |
| uint64 max_size_; |
| uint64 high_watermark_; |
| @@ -184,6 +198,11 @@ class NET_EXPORT_PRIVATE SimpleIndex |
| typedef std::list<net::CompletionCallback> CallbackList; |
| CallbackList to_run_when_initialized_; |
| + |
| + // Set to true when the app is on the background. When the app is in the |
| + // background we can write the index much more frequently, to insure fresh |
| + // index on next startup. |
| + bool app_on_background_; |
| }; |
| } // namespace disk_cache |