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

Side by Side Diff: net/disk_cache/disk_cache.cc

Issue 2922973003: RFC: use some in-memory state in SimpleCache to quickly cache-miss some CantConditionalize cases
Patch Set: - Implement support for oracle bytes in MockHttpCache, so the code actually gets exercised in tests… Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <utility> 5 #include <utility>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 *backend = disk_cache::MemBackendImpl::CreateBackend(max_bytes, net_log); 174 *backend = disk_cache::MemBackendImpl::CreateBackend(max_bytes, net_log);
175 return *backend ? net::OK : net::ERR_FAILED; 175 return *backend ? net::OK : net::ERR_FAILED;
176 } 176 }
177 DCHECK(thread.get()); 177 DCHECK(thread.get());
178 CacheCreator* creator = 178 CacheCreator* creator =
179 new CacheCreator(path, force, max_bytes, type, backend_type, kNone, 179 new CacheCreator(path, force, max_bytes, type, backend_type, kNone,
180 thread, net_log, backend, callback); 180 thread, net_log, backend, callback);
181 return creator->Run(); 181 return creator->Run();
182 } 182 }
183 183
184 int Backend::OpenEntryWithOracleByte(const std::string& key,
185 Entry** entry,
186 const OracleCallback& oracle,
187 const CompletionCallback& callback) {
188 return OpenEntry(key, entry, callback);
189 }
190
184 int Backend::CalculateSizeOfEntriesBetween(base::Time initial_time, 191 int Backend::CalculateSizeOfEntriesBetween(base::Time initial_time,
185 base::Time end_time, 192 base::Time end_time,
186 const CompletionCallback& callback) { 193 const CompletionCallback& callback) {
187 return net::ERR_NOT_IMPLEMENTED; 194 return net::ERR_NOT_IMPLEMENTED;
188 } 195 }
189 196
197 void Entry::SetOracleByte(uint8_t) {}
198
190 } // namespace disk_cache 199 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698