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

Side by Side Diff: android_webview/browser/aw_browser_terminator.h

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
« no previous file with comments | « no previous file | android_webview/browser/aw_browser_terminator.cc » ('j') | base/process/launch.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_TERMINATOR_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_TERMINATOR_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_TERMINATOR_H_ 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_TERMINATOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 13 matching lines...) Expand all
24 // processes of the browser, it can't access the exit code. Instead, the browser 24 // processes of the browser, it can't access the exit code. Instead, the browser
25 // uses a dedicated pipe in order to receive the information about the renderer 25 // uses a dedicated pipe in order to receive the information about the renderer
26 // crash status. 26 // crash status.
27 class AwBrowserTerminator : public breakpad::CrashDumpObserver::Client { 27 class AwBrowserTerminator : public breakpad::CrashDumpObserver::Client {
28 public: 28 public:
29 AwBrowserTerminator(); 29 AwBrowserTerminator();
30 ~AwBrowserTerminator() override; 30 ~AwBrowserTerminator() override;
31 31
32 // breakpad::CrashDumpObserver::Client implementation. 32 // breakpad::CrashDumpObserver::Client implementation.
33 void OnChildStart(int child_process_id, 33 void OnChildStart(int child_process_id,
34 content::FileDescriptorInfo* mappings) override; 34 content::PosixFileDescriptorInfo* mappings) override;
35 void OnChildExit(int child_process_id, 35 void OnChildExit(int child_process_id,
36 base::ProcessHandle pid, 36 base::ProcessHandle pid,
37 content::ProcessType process_type, 37 content::ProcessType process_type,
38 base::TerminationStatus termination_status, 38 base::TerminationStatus termination_status,
39 base::android::ApplicationState app_state) override; 39 base::android::ApplicationState app_state) override;
40 40
41 private: 41 private:
42 static void ProcessTerminationStatus(int child_process_id, 42 static void ProcessTerminationStatus(int child_process_id,
43 base::ProcessHandle pid, 43 base::ProcessHandle pid,
44 std::unique_ptr<base::SyncSocket> pipe); 44 std::unique_ptr<base::SyncSocket> pipe);
45 45
46 // This map should only be accessed with its lock aquired as it is accessed 46 // This map should only be accessed with its lock aquired as it is accessed
47 // from the PROCESS_LAUNCHER, FILE, and UI threads. 47 // from the PROCESS_LAUNCHER, FILE, and UI threads.
48 base::Lock child_process_id_to_pipe_lock_; 48 base::Lock child_process_id_to_pipe_lock_;
49 std::map<int, std::unique_ptr<base::SyncSocket>> child_process_id_to_pipe_; 49 std::map<int, std::unique_ptr<base::SyncSocket>> child_process_id_to_pipe_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(AwBrowserTerminator); 51 DISALLOW_COPY_AND_ASSIGN(AwBrowserTerminator);
52 }; 52 };
53 53
54 } // namespace android_webview 54 } // namespace android_webview
55 55
56 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_TERMINATOR_H_ 56 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_TERMINATOR_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/aw_browser_terminator.cc » ('j') | base/process/launch.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698