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

Side by Side Diff: content/browser/utility_process_host_impl.h

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 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 (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 #ifndef CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 static void EarlyZygoteLaunch(); 68 static void EarlyZygoteLaunch();
69 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) 69 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
70 70
71 private: 71 private:
72 // Starts a process if necessary. Returns true if it succeeded or a process 72 // Starts a process if necessary. Returns true if it succeeded or a process
73 // has already been started via StartBatchMode(). 73 // has already been started via StartBatchMode().
74 bool StartProcess(); 74 bool StartProcess();
75 75
76 // BrowserChildProcessHost: 76 // BrowserChildProcessHost:
77 bool OnMessageReceived(const IPC::Message& message) override; 77 bool OnMessageReceived(const IPC::Message& message) override;
78 void OnProcessLaunchFailed() override; 78 void OnProcessLaunchFailed(int error_code) override;
79 void OnProcessCrashed(int exit_code) override; 79 void OnProcessCrashed(int exit_code) override;
80 80
81 // Cleans up |this| as a result of a failed Start(). 81 // Cleans up |this| as a result of a failed Start().
82 void NotifyAndDelete(); 82 void NotifyAndDelete(int error_code);
83 83
84 // Notifies the client that the launch failed and deletes |host|. 84 // Notifies the client that the launch failed and deletes |host|.
85 static void NotifyLaunchFailedAndDelete( 85 static void NotifyLaunchFailedAndDelete(
86 base::WeakPtr<UtilityProcessHostImpl> host); 86 base::WeakPtr<UtilityProcessHostImpl> host,
87 int error_code);
87 88
88 // A pointer to our client interface, who will be informed of progress. 89 // A pointer to our client interface, who will be informed of progress.
89 scoped_refptr<UtilityProcessHostClient> client_; 90 scoped_refptr<UtilityProcessHostClient> client_;
90 scoped_refptr<base::SequencedTaskRunner> client_task_runner_; 91 scoped_refptr<base::SequencedTaskRunner> client_task_runner_;
91 // True when running in batch mode, i.e., StartBatchMode() has been called 92 // True when running in batch mode, i.e., StartBatchMode() has been called
92 // and the utility process will run until EndBatchMode(). 93 // and the utility process will run until EndBatchMode().
93 bool is_batch_mode_; 94 bool is_batch_mode_;
94 95
95 base::FilePath exposed_dir_; 96 base::FilePath exposed_dir_;
96 97
(...skipping 25 matching lines...) Expand all
122 123
123 // Used to vend weak pointers, and should always be declared last. 124 // Used to vend weak pointers, and should always be declared last.
124 base::WeakPtrFactory<UtilityProcessHostImpl> weak_ptr_factory_; 125 base::WeakPtrFactory<UtilityProcessHostImpl> weak_ptr_factory_;
125 126
126 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); 127 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl);
127 }; 128 };
128 129
129 } // namespace content 130 } // namespace content
130 131
131 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ 132 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698