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

Side by Side Diff: content/browser/cache_storage/cache_storage.cc

Issue 2168123002: [CacheStorage] Add metrics to the scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/cache_storage/cache_storage.h" 5 #include "content/browser/cache_storage/cache_storage.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 const base::FilePath& path, 484 const base::FilePath& path,
485 bool memory_only, 485 bool memory_only,
486 base::SequencedTaskRunner* cache_task_runner, 486 base::SequencedTaskRunner* cache_task_runner,
487 scoped_refptr<net::URLRequestContextGetter> request_context, 487 scoped_refptr<net::URLRequestContextGetter> request_context,
488 scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy, 488 scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy,
489 base::WeakPtr<storage::BlobStorageContext> blob_context, 489 base::WeakPtr<storage::BlobStorageContext> blob_context,
490 const GURL& origin) 490 const GURL& origin)
491 : initialized_(false), 491 : initialized_(false),
492 initializing_(false), 492 initializing_(false),
493 memory_only_(memory_only), 493 memory_only_(memory_only),
494 scheduler_(new CacheStorageScheduler()), 494 scheduler_(new CacheStorageScheduler(
495 CacheStorageSchedulerClient::CLIENT_STORAGE)),
495 origin_path_(path), 496 origin_path_(path),
496 cache_task_runner_(cache_task_runner), 497 cache_task_runner_(cache_task_runner),
497 quota_manager_proxy_(quota_manager_proxy), 498 quota_manager_proxy_(quota_manager_proxy),
498 origin_(origin), 499 origin_(origin),
499 weak_factory_(this) { 500 weak_factory_(this) {
500 if (memory_only) 501 if (memory_only)
501 cache_loader_.reset(new MemoryLoader( 502 cache_loader_.reset(new MemoryLoader(
502 cache_task_runner_.get(), std::move(request_context), 503 cache_task_runner_.get(), std::move(request_context),
503 quota_manager_proxy.get(), blob_context, this, origin)); 504 quota_manager_proxy.get(), blob_context, this, origin));
504 else 505 else
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 std::unique_ptr<CacheStorageCacheHandle> cache_handle = 1017 std::unique_ptr<CacheStorageCacheHandle> cache_handle =
1017 GetLoadedCache(cache_name); 1018 GetLoadedCache(cache_name);
1018 CacheStorageCache* cache = cache_handle->value(); 1019 CacheStorageCache* cache = cache_handle->value();
1019 cache->Size(base::Bind(&SizeRetrievedFromCache, 1020 cache->Size(base::Bind(&SizeRetrievedFromCache,
1020 base::Passed(std::move(cache_handle)), 1021 base::Passed(std::move(cache_handle)),
1021 barrier_closure, accumulator_ptr)); 1022 barrier_closure, accumulator_ptr));
1022 } 1023 }
1023 } 1024 }
1024 1025
1025 } // namespace content 1026 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/background_sync/background_sync_manager.cc ('k') | content/browser/cache_storage/cache_storage_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698