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

Side by Side Diff: net/disk_cache/memory/mem_entry_impl.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/disk_cache/memory/mem_backend_impl.cc ('k') | net/disk_cache/net_log_parameters.cc » ('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 "net/disk_cache/memory/mem_entry_impl.h" 5 #include "net/disk_cache/memory/mem_entry_impl.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
10 #include "base/values.h" 12 #include "base/values.h"
11 #include "net/base/io_buffer.h" 13 #include "net/base/io_buffer.h"
12 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
13 #include "net/disk_cache/memory/mem_backend_impl.h" 15 #include "net/disk_cache/memory/mem_backend_impl.h"
14 #include "net/disk_cache/net_log_parameters.h" 16 #include "net/disk_cache/net_log_parameters.h"
15 17
16 using base::Time; 18 using base::Time;
(...skipping 28 matching lines...) Expand all
45 47
46 // Returns NetLog parameters for the creation of a child MemEntryImpl. Separate 48 // Returns NetLog parameters for the creation of a child MemEntryImpl. Separate
47 // function needed because child entries don't suppport GetKey(). 49 // function needed because child entries don't suppport GetKey().
48 scoped_ptr<base::Value> NetLogChildEntryCreationCallback( 50 scoped_ptr<base::Value> NetLogChildEntryCreationCallback(
49 const disk_cache::MemEntryImpl* parent, 51 const disk_cache::MemEntryImpl* parent,
50 int child_id, 52 int child_id,
51 net::NetLogCaptureMode /* capture_mode */) { 53 net::NetLogCaptureMode /* capture_mode */) {
52 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 54 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
53 dict->SetString("key", GenerateChildName(parent->GetKey(), child_id)); 55 dict->SetString("key", GenerateChildName(parent->GetKey(), child_id));
54 dict->SetBoolean("created", true); 56 dict->SetBoolean("created", true);
55 return dict.Pass(); 57 return std::move(dict);
56 } 58 }
57 59
58 } // namespace 60 } // namespace
59 61
60 namespace disk_cache { 62 namespace disk_cache {
61 63
62 MemEntryImpl::MemEntryImpl(MemBackendImpl* backend) { 64 MemEntryImpl::MemEntryImpl(MemBackendImpl* backend) {
63 doomed_ = false; 65 doomed_ = false;
64 backend_ = backend; 66 backend_ = backend;
65 ref_count_ = 0; 67 ref_count_ = 0;
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 scanned_len += kMaxSparseEntrySize - current_child_offset; 632 scanned_len += kMaxSparseEntrySize - current_child_offset;
631 } 633 }
632 return scanned_len; 634 return scanned_len;
633 } 635 }
634 636
635 void MemEntryImpl::DetachChild(int child_id) { 637 void MemEntryImpl::DetachChild(int child_id) {
636 children_->erase(child_id); 638 children_->erase(child_id);
637 } 639 }
638 640
639 } // namespace disk_cache 641 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.cc ('k') | net/disk_cache/net_log_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698