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

Side by Side Diff: net/http/mock_http_cache.cc

Issue 2779733002: [HttpCache] Store some memcache info to memory dumps for debugging (Closed)
Patch Set: Rebase xunjieli's change Created 3 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 unified diff | Download patch
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | 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 "net/http/mock_http_cache.h" 5 #include "net/http/mock_http_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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 std::unique_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() { 508 std::unique_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() {
509 return std::unique_ptr<Iterator>(new NotImplementedIterator()); 509 return std::unique_ptr<Iterator>(new NotImplementedIterator());
510 } 510 }
511 511
512 void MockDiskCache::GetStats(base::StringPairs* stats) { 512 void MockDiskCache::GetStats(base::StringPairs* stats) {
513 } 513 }
514 514
515 void MockDiskCache::OnExternalCacheHit(const std::string& key) { 515 void MockDiskCache::OnExternalCacheHit(const std::string& key) {
516 } 516 }
517 517
518 size_t MockDiskCache::EstimateMemoryUsage() const { 518 size_t MockDiskCache::DumpMemoryStats(
519 return 0; 519 base::trace_event::ProcessMemoryDump* pmd,
520 const std::string& parent_absolute_name) const {
521 return 0u;
520 } 522 }
521 523
522 void MockDiskCache::ReleaseAll() { 524 void MockDiskCache::ReleaseAll() {
523 EntryMap::iterator it = entries_.begin(); 525 EntryMap::iterator it = entries_.begin();
524 for (; it != entries_.end(); ++it) 526 for (; it != entries_.end(); ++it)
525 it->second->Release(); 527 it->second->Release();
526 entries_.clear(); 528 entries_.clear();
527 } 529 }
528 530
529 void MockDiskCache::CallbackLater(const CompletionCallback& callback, 531 void MockDiskCache::CallbackLater(const CompletionCallback& callback,
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 if (!callback_.is_null()) { 696 if (!callback_.is_null()) {
695 if (!fail_) 697 if (!fail_)
696 backend_->reset(new MockDiskCache()); 698 backend_->reset(new MockDiskCache());
697 CompletionCallback cb = callback_; 699 CompletionCallback cb = callback_;
698 callback_.Reset(); 700 callback_.Reset();
699 cb.Run(Result()); // This object can be deleted here. 701 cb.Run(Result()); // This object can be deleted here.
700 } 702 }
701 } 703 }
702 704
703 } // namespace net 705 } // namespace net
OLDNEW
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698