Chromium Code Reviews

Side by Side Diff: chrome/app/chrome_crash_reporter_client.cc

Issue 633833002: Breakpad Linux: Do not use std::string in a compromised context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix content shell too Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « chrome/app/chrome_crash_reporter_client.h ('k') | components/crash/app/breakpad_linux.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/app/chrome_crash_reporter_client.h" 5 #include "chrome/app/chrome_crash_reporter_client.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 267 matching lines...)
278 *breakpad_enabled = value != 0; 278 *breakpad_enabled = value != 0;
279 return true; 279 return true;
280 } 280 }
281 281
282 return false; 282 return false;
283 } 283 }
284 #endif // defined(OS_WIN) 284 #endif // defined(OS_WIN)
285 285
286 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) 286 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
287 void ChromeCrashReporterClient::GetProductNameAndVersion( 287 void ChromeCrashReporterClient::GetProductNameAndVersion(
288 std::string* product_name, 288 const char** product_name,
289 std::string* version) { 289 const char** version) {
290 DCHECK(product_name); 290 DCHECK(product_name);
291 DCHECK(version); 291 DCHECK(version);
292 #if defined(OS_ANDROID) 292 #if defined(OS_ANDROID)
293 *product_name = "Chrome_Android"; 293 *product_name = "Chrome_Android";
294 #elif defined(OS_CHROMEOS) 294 #elif defined(OS_CHROMEOS)
295 *product_name = "Chrome_ChromeOS"; 295 *product_name = "Chrome_ChromeOS";
296 #else // OS_LINUX 296 #else // OS_LINUX
297 #if !defined(ADDRESS_SANITIZER) 297 #if !defined(ADDRESS_SANITIZER)
298 *product_name = "Chrome_Linux"; 298 *product_name = "Chrome_Linux";
299 #else 299 #else
(...skipping 73 matching lines...)
373 bool ChromeCrashReporterClient::EnableBreakpadForProcess( 373 bool ChromeCrashReporterClient::EnableBreakpadForProcess(
374 const std::string& process_type) { 374 const std::string& process_type) {
375 return process_type == switches::kRendererProcess || 375 return process_type == switches::kRendererProcess ||
376 process_type == switches::kPluginProcess || 376 process_type == switches::kPluginProcess ||
377 process_type == switches::kPpapiPluginProcess || 377 process_type == switches::kPpapiPluginProcess ||
378 process_type == switches::kZygoteProcess || 378 process_type == switches::kZygoteProcess ||
379 process_type == switches::kGpuProcess; 379 process_type == switches::kGpuProcess;
380 } 380 }
381 381
382 } // namespace chrome 382 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/chrome_crash_reporter_client.h ('k') | components/crash/app/breakpad_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine