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

Side by Side Diff: src/processor/minidump.cc

Issue 1287803002: Allow Print() to be called by const instances of MinidumpLinuxMaps and (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « src/google_breakpad/processor/minidump.h ('k') | no next file » | 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) 2010 Google Inc. 1 // Copyright (c) 2010 Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 3981 matching lines...) Expand 10 before | Expand all | Expand 10 after
3992 } 3992 }
3993 3993
3994 // 3994 //
3995 // MinidumpLinuxMaps 3995 // MinidumpLinuxMaps
3996 // 3996 //
3997 3997
3998 MinidumpLinuxMaps::MinidumpLinuxMaps(Minidump *minidump) 3998 MinidumpLinuxMaps::MinidumpLinuxMaps(Minidump *minidump)
3999 : MinidumpObject(minidump) { 3999 : MinidumpObject(minidump) {
4000 } 4000 }
4001 4001
4002 void MinidumpLinuxMaps::Print() { 4002 void MinidumpLinuxMaps::Print() const {
4003 if (!valid_) { 4003 if (!valid_) {
4004 BPLOG(ERROR) << "MinidumpLinuxMaps cannot print invalid data"; 4004 BPLOG(ERROR) << "MinidumpLinuxMaps cannot print invalid data";
4005 return; 4005 return;
4006 } 4006 }
4007 std::cout << region_.line << std::endl; 4007 std::cout << region_.line << std::endl;
4008 } 4008 }
4009 4009
4010 // 4010 //
4011 // MinidumpLinuxMapsList 4011 // MinidumpLinuxMapsList
4012 // 4012 //
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4118 maps->push_back(ele.release()); 4118 maps->push_back(ele.release());
4119 } 4119 }
4120 4120
4121 // Set instance variables. 4121 // Set instance variables.
4122 maps_ = maps.release(); 4122 maps_ = maps.release();
4123 maps_count_ = maps_->size(); 4123 maps_count_ = maps_->size();
4124 valid_ = true; 4124 valid_ = true;
4125 return true; 4125 return true;
4126 } 4126 }
4127 4127
4128 void MinidumpLinuxMapsList::Print() { 4128 void MinidumpLinuxMapsList::Print() const {
4129 if (!valid_ || (maps_ == NULL)) { 4129 if (!valid_ || (maps_ == NULL)) {
4130 BPLOG(ERROR) << "MinidumpLinuxMapsList cannot print valid data"; 4130 BPLOG(ERROR) << "MinidumpLinuxMapsList cannot print valid data";
4131 return; 4131 return;
4132 } 4132 }
4133 for (size_t i = 0; i < maps_->size(); i++) { 4133 for (size_t i = 0; i < maps_->size(); i++) {
4134 (*maps_)[i]->Print(); 4134 (*maps_)[i]->Print();
4135 } 4135 }
4136 } 4136 }
4137 4137
4138 // 4138 //
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
4789 return NULL; 4789 return NULL;
4790 } 4790 }
4791 4791
4792 *stream = new_stream.release(); 4792 *stream = new_stream.release();
4793 info->stream = *stream; 4793 info->stream = *stream;
4794 return *stream; 4794 return *stream;
4795 } 4795 }
4796 4796
4797 4797
4798 } // namespace google_breakpad 4798 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « src/google_breakpad/processor/minidump.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698