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

Side by Side Diff: components/drive/file_change.cc

Issue 1869063004: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « components/drive/file_change.h ('k') | components/metrics/leak_detector/leak_detector.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 "components/drive/file_change.h" 5 #include "components/drive/file_change.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 std::ostringstream ss; 84 std::ostringstream ss;
85 ss << "{ "; 85 ss << "{ ";
86 for (size_t i = 0; i < list_.size(); ++i) 86 for (size_t i = 0; i < list_.size(); ++i)
87 ss << list_[i].DebugString() << ", "; 87 ss << list_[i].DebugString() << ", ";
88 ss << "}"; 88 ss << "}";
89 return ss.str(); 89 return ss.str();
90 } 90 }
91 91
92 FileChange::FileChange() { 92 FileChange::FileChange() {
93 } 93 }
94 FileChange::FileChange(const FileChange& other) = default;
94 FileChange::~FileChange() {} 95 FileChange::~FileChange() {}
95 96
96 void FileChange::Update(const base::FilePath file_path, 97 void FileChange::Update(const base::FilePath file_path,
97 const FileChange::Change& new_change) { 98 const FileChange::Change& new_change) {
98 map_[file_path].Update(new_change); 99 map_[file_path].Update(new_change);
99 } 100 }
100 101
101 void FileChange::Update(const base::FilePath file_path, 102 void FileChange::Update(const base::FilePath file_path,
102 const FileChange::ChangeList& new_change) { 103 const FileChange::ChangeList& new_change) {
103 for (ChangeList::List::const_iterator it = new_change.list().begin(); 104 for (ChangeList::List::const_iterator it = new_change.list().begin();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 ss << "{ "; 147 ss << "{ ";
147 for (FileChange::Map::const_iterator it = map_.begin(); it != map_.end(); 148 for (FileChange::Map::const_iterator it = map_.begin(); it != map_.end();
148 it++) { 149 it++) {
149 ss << it->first.value() << ": " << it->second.DebugString() << ", "; 150 ss << it->first.value() << ": " << it->second.DebugString() << ", ";
150 } 151 }
151 ss << "}"; 152 ss << "}";
152 return ss.str(); 153 return ss.str();
153 } 154 }
154 155
155 } // namespace drive 156 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/file_change.h ('k') | components/metrics/leak_detector/leak_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698