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

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

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Fix Mojo launcher, review comments Created 3 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_observer_android.h" 5 #include "components/crash/content/browser/crash_dump_observer_android.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 registered_clients_copy.push_back(client.get()); 77 registered_clients_copy.push_back(client.get());
78 } 78 }
79 for (auto* client : registered_clients_copy) { 79 for (auto* client : registered_clients_copy) {
80 client->OnChildExit(child_process_id, pid, process_type, termination_status, 80 client->OnChildExit(child_process_id, pid, process_type, termination_status,
81 app_state); 81 app_state);
82 } 82 }
83 } 83 }
84 84
85 void CrashDumpObserver::BrowserChildProcessStarted( 85 void CrashDumpObserver::BrowserChildProcessStarted(
86 int child_process_id, 86 int child_process_id,
87 content::FileDescriptorInfo* mappings) { 87 content::PosixFileDescriptorInfo* mappings) {
88 std::vector<Client*> registered_clients_copy; 88 std::vector<Client*> registered_clients_copy;
89 { 89 {
90 base::AutoLock auto_lock(registered_clients_lock_); 90 base::AutoLock auto_lock(registered_clients_lock_);
91 for (auto& client : registered_clients_) 91 for (auto& client : registered_clients_)
92 registered_clients_copy.push_back(client.get()); 92 registered_clients_copy.push_back(client.get());
93 } 93 }
94 for (auto* client : registered_clients_copy) { 94 for (auto* client : registered_clients_copy) {
95 client->OnChildStart(child_process_id, mappings); 95 client->OnChildStart(child_process_id, mappings);
96 } 96 }
97 } 97 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (pid == base::kNullProcessHandle) { 161 if (pid == base::kNullProcessHandle) {
162 pid = iter->second; 162 pid = iter->second;
163 } 163 }
164 child_process_id_to_pid_.erase(iter); 164 child_process_id_to_pid_.erase(iter);
165 } 165 }
166 OnChildExit(rph->GetID(), pid, content::PROCESS_TYPE_RENDERER, term_status, 166 OnChildExit(rph->GetID(), pid, content::PROCESS_TYPE_RENDERER, term_status,
167 app_state); 167 app_state);
168 } 168 }
169 169
170 } // namespace breakpad 170 } // namespace breakpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698