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

Side by Side Diff: components/crash/content/browser/crash_dump_manager_android.cc

Issue 2304733002: crash: Fixes following r413431 (Closed)
Patch Set: Created 4 years, 3 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 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 "components/crash/content/browser/crash_dump_manager_android.h" 5 #include "components/crash/content/browser/crash_dump_manager_android.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 21 matching lines...) Expand all
32 int descriptor_id) 32 int descriptor_id)
33 : crash_dump_dir_(crash_dump_dir), descriptor_id_(descriptor_id) {} 33 : crash_dump_dir_(crash_dump_dir), descriptor_id_(descriptor_id) {}
34 34
35 CrashDumpManager::~CrashDumpManager() { 35 CrashDumpManager::~CrashDumpManager() {
36 } 36 }
37 37
38 void CrashDumpManager::OnChildStart(int child_process_id, 38 void CrashDumpManager::OnChildStart(int child_process_id,
39 content::FileDescriptorInfo* mappings) { 39 content::FileDescriptorInfo* mappings) {
40 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); 40 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER);
41 41
42 //if (!breakpad::IsCrashReporterEnabled()) 42 if (!breakpad::IsCrashReporterEnabled())
Lei Zhang 2016/09/01 23:17:58 Whoa, what happened here? Do we need to merge this
boliu 2016/09/01 23:26:18 yes, definitely needs to be merged
43 // return; 43 return;
44 44
45 base::FilePath minidump_path; 45 base::FilePath minidump_path;
46 if (!base::CreateTemporaryFile(&minidump_path)) { 46 if (!base::CreateTemporaryFile(&minidump_path)) {
47 LOG(ERROR) << "Failed to create temporary file, crash won't be reported."; 47 LOG(ERROR) << "Failed to create temporary file, crash won't be reported.";
48 return; 48 return;
49 } 49 }
50 50
51 // We need read permission as the minidump is generated in several phases 51 // We need read permission as the minidump is generated in several phases
52 // and needs to be read at some point. 52 // and needs to be read at some point.
53 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ | 53 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return; 163 return;
164 } 164 }
165 minidump_path = iter->second; 165 minidump_path = iter->second;
166 child_process_id_to_minidump_path_.erase(iter); 166 child_process_id_to_minidump_path_.erase(iter);
167 } 167 }
168 ProcessMinidump(minidump_path, pid, process_type, termination_status, 168 ProcessMinidump(minidump_path, pid, process_type, termination_status,
169 app_state); 169 app_state);
170 } 170 }
171 171
172 } // namespace breakpad 172 } // namespace breakpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698