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

Unified Diff: net/disk_cache/cache_creator.cc

Issue 13907009: Support optimistic Create and Write operations on the SimpleCache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gavin comments Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/cache_creator.cc
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc
index fb2bd34f4ece18a85e58d054e55a5e27cfcc0be7..acdf0551322fe22502b2af1dc5d697880eb71f05 100644
--- a/net/disk_cache/cache_creator.cc
+++ b/net/disk_cache/cache_creator.cc
@@ -81,6 +81,16 @@ int CacheCreator::Run() {
// not belong to it.
const std::string experiment_name =
base::FieldTrialList::FindFullName("SimpleCacheTrial");
+
+ if (type_ == net::DISK_CACHE) {
gavinp 2013/05/03 11:19:27 This will need to be removed before landing.
+ disk_cache::SimpleBackendImpl* simple_cache =
+ new disk_cache::SimpleBackendImpl(path_, max_bytes_, type_, thread_,
+ net_log_);
+ created_cache_ = simple_cache;
+ return simple_cache->Init(
+ base::Bind(&CacheCreator::OnIOComplete, base::Unretained(this)));
+ }
+
if (experiment_name == "ExplicitYes" || experiment_name == "ExperimentYes" ||
experiment_name == "ExperimentYes2") {
// TODO(gavinp,pasko): While simple backend development proceeds, we're only

Powered by Google App Engine
This is Rietveld 408576698