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

Side by Side Diff: content/browser/cache_storage/cache_storage_cache.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_cache.h" 5 #include "content/browser/cache_storage/cache_storage_cache.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 536 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
537 scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy, 537 scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy,
538 base::WeakPtr<storage::BlobStorageContext> blob_context) 538 base::WeakPtr<storage::BlobStorageContext> blob_context)
539 : origin_(origin), 539 : origin_(origin),
540 cache_name_(cache_name), 540 cache_name_(cache_name),
541 path_(path), 541 path_(path),
542 cache_storage_(cache_storage), 542 cache_storage_(cache_storage),
543 request_context_getter_(std::move(request_context_getter)), 543 request_context_getter_(std::move(request_context_getter)),
544 quota_manager_proxy_(std::move(quota_manager_proxy)), 544 quota_manager_proxy_(std::move(quota_manager_proxy)),
545 blob_storage_context_(blob_context), 545 blob_storage_context_(blob_context),
546 scheduler_(new CacheStorageScheduler()), 546 scheduler_(
547 new CacheStorageScheduler(CacheStorageSchedulerClient::CLIENT_CACHE)),
547 memory_only_(path.empty()), 548 memory_only_(path.empty()),
548 weak_ptr_factory_(this) { 549 weak_ptr_factory_(this) {
549 DCHECK(!origin_.is_empty()); 550 DCHECK(!origin_.is_empty());
550 DCHECK(quota_manager_proxy_.get()); 551 DCHECK(quota_manager_proxy_.get());
551 552
552 quota_manager_proxy_->NotifyOriginInUse(origin_); 553 quota_manager_proxy_->NotifyOriginInUse(origin_);
553 } 554 }
554 555
555 void CacheStorageCache::OpenAllEntries(const OpenAllEntriesCallback& callback) { 556 void CacheStorageCache::OpenAllEntries(const OpenAllEntriesCallback& callback) {
556 std::unique_ptr<OpenAllEntriesContext> entries_context( 557 std::unique_ptr<OpenAllEntriesContext> entries_context(
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 temp_entry, INDEX_RESPONSE_BODY, INDEX_SIDE_DATA); 1481 temp_entry, INDEX_RESPONSE_BODY, INDEX_SIDE_DATA);
1481 return blob_storage_context_->AddFinishedBlob(&blob_data); 1482 return blob_storage_context_->AddFinishedBlob(&blob_data);
1482 } 1483 }
1483 1484
1484 std::unique_ptr<CacheStorageCacheHandle> 1485 std::unique_ptr<CacheStorageCacheHandle>
1485 CacheStorageCache::CreateCacheHandle() { 1486 CacheStorageCache::CreateCacheHandle() {
1486 return cache_storage_->CreateCacheHandle(this); 1487 return cache_storage_->CreateCacheHandle(this);
1487 } 1488 }
1488 1489
1489 } // namespace content 1490 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/cache_storage/cache_storage.cc ('k') | content/browser/cache_storage/cache_storage_histogram_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698