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

Side by Side Diff: chrome/service/service_utility_process_host.h

Issue 98603007: Launches a privileged utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds the elevation flag to the utility process. Created 6 years, 10 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 | « chrome/chrome.gyp ('k') | chrome/service/service_utility_process_host.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 (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 CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ 5 #ifndef CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_
6 #define CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ 6 #define CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // in a sandbox. Returns result as printing::PrinterSemanticCapsAndDefaults. 114 // in a sandbox. Returns result as printing::PrinterSemanticCapsAndDefaults.
115 bool StartGetPrinterSemanticCapsAndDefaults(const std::string& printer_name); 115 bool StartGetPrinterSemanticCapsAndDefaults(const std::string& printer_name);
116 116
117 protected: 117 protected:
118 // Allows this method to be overridden for tests. 118 // Allows this method to be overridden for tests.
119 virtual base::FilePath GetUtilityProcessCmd(); 119 virtual base::FilePath GetUtilityProcessCmd();
120 120
121 // ChildProcessHostDelegate implementation: 121 // ChildProcessHostDelegate implementation:
122 virtual void OnChildDisconnected() OVERRIDE; 122 virtual void OnChildDisconnected() OVERRIDE;
123 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 123 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
124 virtual base::ProcessHandle GetHandle() const OVERRIDE;
124 125
125 private: 126 private:
126 // Starts a process. Returns true iff it succeeded. |exposed_dir| is the 127 // Starts a process. Returns true iff it succeeded. |exposed_dir| is the
127 // path to the exposed to the sandbox. This is ignored if |no_sandbox| is 128 // path to the exposed to the sandbox. This is ignored if |no_sandbox| is
128 // true. 129 // true.
129 bool StartProcess(bool no_sandbox, const base::FilePath& exposed_dir); 130 bool StartProcess(bool no_sandbox, const base::FilePath& exposed_dir);
130 131
131 // Launch the child process synchronously. 132 // Launch the child process synchronously.
132 // TODO(sanjeevr): Determine whether we need to make the launch asynchronous. 133 // TODO(sanjeevr): Determine whether we need to make the launch asynchronous.
133 // |exposed_dir| is the path to tbe exposed to the sandbox. This is ignored 134 // |exposed_dir| is the path to tbe exposed to the sandbox. This is ignored
(...skipping 28 matching lines...) Expand all
162 base::FilePath metafile_path_; 163 base::FilePath metafile_path_;
163 // The temporary folder created for the metafile. 164 // The temporary folder created for the metafile.
164 scoped_ptr<base::ScopedTempDir> scratch_metafile_dir_; 165 scoped_ptr<base::ScopedTempDir> scratch_metafile_dir_;
165 // Start time of operation. 166 // Start time of operation.
166 base::Time start_time_; 167 base::Time start_time_;
167 168
168 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost); 169 DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost);
169 }; 170 };
170 171
171 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_ 172 #endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/service/service_utility_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698