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

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

Issue 1728033002: 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, 10 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 (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 25 matching lines...) Expand all
36 break; 36 break;
37 case FILE_TYPE_NO_INFO: 37 case FILE_TYPE_NO_INFO:
38 // Keeps it as "no_info". 38 // Keeps it as "no_info".
39 break; 39 break;
40 } 40 }
41 return base::StringPrintf("%s:%s", change_string, type_string); 41 return base::StringPrintf("%s:%s", change_string, type_string);
42 } 42 }
43 43
44 FileChange::ChangeList::ChangeList() { 44 FileChange::ChangeList::ChangeList() {
45 } 45 }
46 FileChange::ChangeList::ChangeList(const ChangeList& other) = default;
46 FileChange::ChangeList::~ChangeList() { 47 FileChange::ChangeList::~ChangeList() {
47 } 48 }
48 49
49 void FileChange::ChangeList::Update(const Change& new_change) { 50 void FileChange::ChangeList::Update(const Change& new_change) {
50 if (list_.empty()) { 51 if (list_.empty()) {
51 list_.push_back(new_change); 52 list_.push_back(new_change);
52 return; 53 return;
53 } 54 }
54 55
55 Change& last = list_.back(); 56 Change& last = list_.back();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ss << "{ "; 146 ss << "{ ";
146 for (FileChange::Map::const_iterator it = map_.begin(); it != map_.end(); 147 for (FileChange::Map::const_iterator it = map_.begin(); it != map_.end();
147 it++) { 148 it++) {
148 ss << it->first.value() << ": " << it->second.DebugString() << ", "; 149 ss << it->first.value() << ": " << it->second.DebugString() << ", ";
149 } 150 }
150 ss << "}"; 151 ss << "}";
151 return ss.str(); 152 return ss.str();
152 } 153 }
153 154
154 } // namespace drive 155 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698