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

Side by Side Diff: base/debug/crash_logging.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.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
« no previous file with comments | « base/containers/scoped_ptr_map_unittest.cc ('k') | base/debug/profiler.cc » ('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 "base/debug/crash_logging.h" 5 #include "base/debug/crash_logging.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <map> 8 #include <map>
9 9
10 #include "base/debug/stack_trace.h" 10 #include "base/debug/stack_trace.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 size_t length = 0; 112 size_t length = 0;
113 113
114 for (size_t i = 0; i < count; ++i) { 114 for (size_t i = 0; i < count; ++i) {
115 std::string s = base::StringPrintf("%p", addresses[i]); 115 std::string s = base::StringPrintf("%p", addresses[i]);
116 length += s.length() + 1; 116 length += s.length() + 1;
117 if (length > kBreakpadValueMax) 117 if (length > kBreakpadValueMax)
118 break; 118 break;
119 hex_backtrace.push_back(s); 119 hex_backtrace.push_back(s);
120 } 120 }
121 121
122 value = JoinString(hex_backtrace, ' '); 122 value = base::JoinString(hex_backtrace, " ");
123 123
124 // Warn if this exceeds the breakpad limits. 124 // Warn if this exceeds the breakpad limits.
125 DCHECK_LE(value.length(), kBreakpadValueMax); 125 DCHECK_LE(value.length(), kBreakpadValueMax);
126 } 126 }
127 127
128 SetCrashKeyValue(key, value); 128 SetCrashKeyValue(key, value);
129 } 129 }
130 130
131 ScopedCrashKey::ScopedCrashKey(const base::StringPiece& key, 131 ScopedCrashKey::ScopedCrashKey(const base::StringPiece& key,
132 const base::StringPiece& value) 132 const base::StringPiece& value)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 void ResetCrashLoggingForTesting() { 194 void ResetCrashLoggingForTesting() {
195 delete g_crash_keys_; 195 delete g_crash_keys_;
196 g_crash_keys_ = NULL; 196 g_crash_keys_ = NULL;
197 g_chunk_max_length_ = 0; 197 g_chunk_max_length_ = 0;
198 g_set_key_func_ = NULL; 198 g_set_key_func_ = NULL;
199 g_clear_key_func_ = NULL; 199 g_clear_key_func_ = NULL;
200 } 200 }
201 201
202 } // namespace debug 202 } // namespace debug
203 } // namespace base 203 } // namespace base
OLDNEW
« no previous file with comments | « base/containers/scoped_ptr_map_unittest.cc ('k') | base/debug/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698