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

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

Issue 1111203002: Use of base::StringPairs appropriately in simple_backend_impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | net/disk_cache/simple/simple_backend_impl.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_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>
11 11
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/strings/string_split.h"
19 #include "base/task_runner.h" 20 #include "base/task_runner.h"
20 #include "base/time/time.h" 21 #include "base/time/time.h"
21 #include "net/base/cache_type.h" 22 #include "net/base/cache_type.h"
22 #include "net/disk_cache/disk_cache.h" 23 #include "net/disk_cache/disk_cache.h"
23 #include "net/disk_cache/simple/simple_entry_impl.h" 24 #include "net/disk_cache/simple/simple_entry_impl.h"
24 #include "net/disk_cache/simple/simple_index_delegate.h" 25 #include "net/disk_cache/simple/simple_index_delegate.h"
25 26
26 namespace base { 27 namespace base {
27 class SingleThreadTaskRunner; 28 class SingleThreadTaskRunner;
28 class TaskRunner; 29 class TaskRunner;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const CompletionCallback& callback) override; 99 const CompletionCallback& callback) override;
99 int DoomEntry(const std::string& key, 100 int DoomEntry(const std::string& key,
100 const CompletionCallback& callback) override; 101 const CompletionCallback& callback) override;
101 int DoomAllEntries(const CompletionCallback& callback) override; 102 int DoomAllEntries(const CompletionCallback& callback) override;
102 int DoomEntriesBetween(base::Time initial_time, 103 int DoomEntriesBetween(base::Time initial_time,
103 base::Time end_time, 104 base::Time end_time,
104 const CompletionCallback& callback) override; 105 const CompletionCallback& callback) override;
105 int DoomEntriesSince(base::Time initial_time, 106 int DoomEntriesSince(base::Time initial_time,
106 const CompletionCallback& callback) override; 107 const CompletionCallback& callback) override;
107 scoped_ptr<Iterator> CreateIterator() override; 108 scoped_ptr<Iterator> CreateIterator() override;
108 void GetStats( 109 void GetStats(base::StringPairs* stats) override;
109 std::vector<std::pair<std::string, std::string>>* stats) override;
110 void OnExternalCacheHit(const std::string& key) override; 110 void OnExternalCacheHit(const std::string& key) override;
111 111
112 private: 112 private:
113 class SimpleIterator; 113 class SimpleIterator;
114 friend class SimpleIterator; 114 friend class SimpleIterator;
115 115
116 typedef base::hash_map<uint64, SimpleEntryImpl*> EntryMap; 116 typedef base::hash_map<uint64, SimpleEntryImpl*> EntryMap;
117 117
118 typedef base::Callback<void(base::Time mtime, uint64 max_size, int result)> 118 typedef base::Callback<void(base::Time mtime, uint64 max_size, int result)>
119 InitializeIndexCallback; 119 InitializeIndexCallback;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // is complete. The base::Closure map target is used to store deferred 203 // is complete. The base::Closure map target is used to store deferred
204 // operations to be run at the completion of the Doom. 204 // operations to be run at the completion of the Doom.
205 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_; 205 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_;
206 206
207 net::NetLog* const net_log_; 207 net::NetLog* const net_log_;
208 }; 208 };
209 209
210 } // namespace disk_cache 210 } // namespace disk_cache
211 211
212 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 212 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698