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

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

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years 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 15 matching lines...) Expand all
26 MinidumpSimpleStringDictionaryEntryWriter:: 26 MinidumpSimpleStringDictionaryEntryWriter::
27 MinidumpSimpleStringDictionaryEntryWriter() 27 MinidumpSimpleStringDictionaryEntryWriter()
28 : MinidumpWritable(), entry_(), key_(), value_() { 28 : MinidumpWritable(), entry_(), key_(), value_() {
29 } 29 }
30 30
31 MinidumpSimpleStringDictionaryEntryWriter:: 31 MinidumpSimpleStringDictionaryEntryWriter::
32 ~MinidumpSimpleStringDictionaryEntryWriter() { 32 ~MinidumpSimpleStringDictionaryEntryWriter() {
33 } 33 }
34 34
35 const MinidumpSimpleStringDictionaryEntry* 35 const MinidumpSimpleStringDictionaryEntry*
36 MinidumpSimpleStringDictionaryEntryWriter::MinidumpSimpleStringDictionaryEntry() 36 MinidumpSimpleStringDictionaryEntryWriter::
37 const { 37 GetMinidumpSimpleStringDictionaryEntry() const {
38 DCHECK_EQ(state(), kStateWritable); 38 DCHECK_EQ(state(), kStateWritable);
39 39
40 return &entry_; 40 return &entry_;
41 } 41 }
42 42
43 void MinidumpSimpleStringDictionaryEntryWriter::SetKeyValue( 43 void MinidumpSimpleStringDictionaryEntryWriter::SetKeyValue(
44 const std::string& key, 44 const std::string& key,
45 const std::string& value) { 45 const std::string& value) {
46 DCHECK_EQ(state(), kStateMutable); 46 DCHECK_EQ(state(), kStateMutable);
47 47
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool MinidumpSimpleStringDictionaryWriter::WriteObject( 172 bool MinidumpSimpleStringDictionaryWriter::WriteObject(
173 FileWriterInterface* file_writer) { 173 FileWriterInterface* file_writer) {
174 DCHECK_GE(state(), kStateWritable); 174 DCHECK_GE(state(), kStateWritable);
175 175
176 WritableIoVec iov; 176 WritableIoVec iov;
177 iov.iov_base = simple_string_dictionary_base_.get(); 177 iov.iov_base = simple_string_dictionary_base_.get();
178 iov.iov_len = sizeof(*simple_string_dictionary_base_); 178 iov.iov_len = sizeof(*simple_string_dictionary_base_);
179 std::vector<WritableIoVec> iovecs(1, iov); 179 std::vector<WritableIoVec> iovecs(1, iov);
180 180
181 for (const auto& key_entry : entries_) { 181 for (const auto& key_entry : entries_) {
182 iov.iov_base = key_entry.second->MinidumpSimpleStringDictionaryEntry(); 182 iov.iov_base = key_entry.second->GetMinidumpSimpleStringDictionaryEntry();
183 iov.iov_len = sizeof(MinidumpSimpleStringDictionaryEntry); 183 iov.iov_len = sizeof(MinidumpSimpleStringDictionaryEntry);
184 iovecs.push_back(iov); 184 iovecs.push_back(iov);
185 } 185 }
186 186
187 return file_writer->WriteIoVec(&iovecs); 187 return file_writer->WriteIoVec(&iovecs);
188 } 188 }
189 189
190 } // namespace crashpad 190 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698