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

Side by Side Diff: third_party/crashpad/crashpad/minidump/minidump_simple_string_dictionary_writer.cc

Issue 2233733002: third_party/crashpad: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated README.chromium 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 Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return true; 92 return true;
93 } 93 }
94 94
95 MinidumpSimpleStringDictionaryWriter::MinidumpSimpleStringDictionaryWriter() 95 MinidumpSimpleStringDictionaryWriter::MinidumpSimpleStringDictionaryWriter()
96 : MinidumpWritable(), 96 : MinidumpWritable(),
97 entries_(), 97 entries_(),
98 simple_string_dictionary_base_(new MinidumpSimpleStringDictionary()) { 98 simple_string_dictionary_base_(new MinidumpSimpleStringDictionary()) {
99 } 99 }
100 100
101 MinidumpSimpleStringDictionaryWriter::~MinidumpSimpleStringDictionaryWriter() { 101 MinidumpSimpleStringDictionaryWriter::~MinidumpSimpleStringDictionaryWriter() {
102 STLDeleteContainerPairSecondPointers(entries_.begin(), entries_.end()); 102 base::STLDeleteContainerPairSecondPointers(entries_.begin(), entries_.end());
103 } 103 }
104 104
105 void MinidumpSimpleStringDictionaryWriter::InitializeFromMap( 105 void MinidumpSimpleStringDictionaryWriter::InitializeFromMap(
106 const std::map<std::string, std::string>& map) { 106 const std::map<std::string, std::string>& map) {
107 DCHECK_EQ(state(), kStateMutable); 107 DCHECK_EQ(state(), kStateMutable);
108 DCHECK(entries_.empty()); 108 DCHECK(entries_.empty());
109 109
110 for (const auto& iterator : map) { 110 for (const auto& iterator : map) {
111 auto entry = 111 auto entry =
112 base::WrapUnique(new MinidumpSimpleStringDictionaryEntryWriter()); 112 base::WrapUnique(new MinidumpSimpleStringDictionaryEntryWriter());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 for (const auto& key_entry : entries_) { 180 for (const auto& key_entry : entries_) {
181 iov.iov_base = key_entry.second->MinidumpSimpleStringDictionaryEntry(); 181 iov.iov_base = key_entry.second->MinidumpSimpleStringDictionaryEntry();
182 iov.iov_len = sizeof(MinidumpSimpleStringDictionaryEntry); 182 iov.iov_len = sizeof(MinidumpSimpleStringDictionaryEntry);
183 iovecs.push_back(iov); 183 iovecs.push_back(iov);
184 } 184 }
185 185
186 return file_writer->WriteIoVec(&iovecs); 186 return file_writer->WriteIoVec(&iovecs);
187 } 187 }
188 188
189 } // namespace crashpad 189 } // namespace crashpad
OLDNEW
« no previous file with comments | « third_party/crashpad/crashpad/minidump/minidump_handle_writer.cc ('k') | third_party/crashpad/crashpad/util/net/http_body.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698