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

Side by Side Diff: content/browser/appcache/appcache_disk_cache.cc

Issue 2858133002: Add uma stats to help evaluate the impact of changes to the quota allocation logic. (Closed)
Patch Set: macros Created 3 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 | « components/leveldb/env_mojo.cc ('k') | content/browser/appcache/appcache_response.h » ('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) 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 "content/browser/appcache/appcache_disk_cache.h" 5 #include "content/browser/appcache/appcache_disk_cache.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 return net::ERR_IO_PENDING; 310 return net::ERR_IO_PENDING;
311 } 311 }
312 312
313 if (!disk_cache_) 313 if (!disk_cache_)
314 return net::ERR_FAILED; 314 return net::ERR_FAILED;
315 315
316 return ActiveCall::DoomEntry(weak_factory_.GetWeakPtr(), key, callback); 316 return ActiveCall::DoomEntry(weak_factory_.GetWeakPtr(), key, callback);
317 } 317 }
318 318
319 AppCacheDiskCache::AppCacheDiskCache(bool use_simple_cache) 319 AppCacheDiskCache::AppCacheDiskCache(bool use_simple_cache)
320 : use_simple_cache_(use_simple_cache), 320 : AppCacheDiskCacheInterface("DiskCache.AppCache"),
321 use_simple_cache_(use_simple_cache),
321 is_disabled_(false), 322 is_disabled_(false),
322 is_waiting_to_initialize_(false), 323 is_waiting_to_initialize_(false),
323 weak_factory_(this) { 324 weak_factory_(this) {}
324 }
325 325
326 AppCacheDiskCache::PendingCall::PendingCall() 326 AppCacheDiskCache::PendingCall::PendingCall()
327 : call_type(CREATE), 327 : call_type(CREATE),
328 key(0), 328 key(0),
329 entry(NULL) { 329 entry(NULL) {
330 } 330 }
331 331
332 AppCacheDiskCache::PendingCall::PendingCall( 332 AppCacheDiskCache::PendingCall::PendingCall(
333 PendingCallType call_type, 333 PendingCallType call_type,
334 int64_t key, 334 int64_t key,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 NOTREACHED(); 400 NOTREACHED();
401 break; 401 break;
402 } 402 }
403 if (rv != net::ERR_IO_PENDING) 403 if (rv != net::ERR_IO_PENDING)
404 iter->callback.Run(rv); 404 iter->callback.Run(rv);
405 } 405 }
406 pending_calls_.clear(); 406 pending_calls_.clear();
407 } 407 }
408 408
409 } // namespace content 409 } // namespace content
OLDNEW
« no previous file with comments | « components/leveldb/env_mojo.cc ('k') | content/browser/appcache/appcache_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698