Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: net/disk_cache/simple/simple_index.h

Issue 511163002: Net-related fixups for scoped_refptr conversion operator cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix naming to match Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.cc ('k') | net/disk_cache/simple/simple_index.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_INDEX_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 int32 entry_size_; // Storage size in bytes. 70 int32 entry_size_; // Storage size in bytes.
71 }; 71 };
72 COMPILE_ASSERT(sizeof(EntryMetadata) == 8, metadata_size); 72 COMPILE_ASSERT(sizeof(EntryMetadata) == 8, metadata_size);
73 73
74 // This class is not Thread-safe. 74 // This class is not Thread-safe.
75 class NET_EXPORT_PRIVATE SimpleIndex 75 class NET_EXPORT_PRIVATE SimpleIndex
76 : public base::SupportsWeakPtr<SimpleIndex> { 76 : public base::SupportsWeakPtr<SimpleIndex> {
77 public: 77 public:
78 typedef std::vector<uint64> HashList; 78 typedef std::vector<uint64> HashList;
79 79
80 SimpleIndex(base::SingleThreadTaskRunner* io_thread, 80 SimpleIndex(const scoped_refptr<base::SingleThreadTaskRunner>& io_thread,
81 SimpleIndexDelegate* delegate, 81 SimpleIndexDelegate* delegate,
82 net::CacheType cache_type, 82 net::CacheType cache_type,
83 scoped_ptr<SimpleIndexFile> simple_index_file); 83 scoped_ptr<SimpleIndexFile> simple_index_file);
84 84
85 virtual ~SimpleIndex(); 85 virtual ~SimpleIndex();
86 86
87 void Initialize(base::Time cache_mtime); 87 void Initialize(base::Time cache_mtime);
88 88
89 bool SetMaxSize(int max_bytes); 89 bool SetMaxSize(int max_bytes);
90 int max_size() const { return max_size_; } 90 int max_size() const { return max_size_; }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 // Set to true when the app is on the background. When the app is in the 194 // Set to true when the app is on the background. When the app is in the
195 // background we can write the index much more frequently, to insure fresh 195 // background we can write the index much more frequently, to insure fresh
196 // index on next startup. 196 // index on next startup.
197 bool app_on_background_; 197 bool app_on_background_;
198 }; 198 };
199 199
200 } // namespace disk_cache 200 } // namespace disk_cache
201 201
202 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_ 202 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_H_
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.cc ('k') | net/disk_cache/simple/simple_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698