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

Side by Side Diff: chrome/browser/service_process/service_process_control.h

Issue 347953002: Use the same set of switches for service process autorun and for launching process from browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thu 06/19/2014 19:02:33.22 Created 6 years, 6 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 | Annotate | Revision Log
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_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ 5 #ifndef CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_
6 #define CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ 6 #define CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // reply from service. The method resets any previous callback. 138 // reply from service. The method resets any previous callback.
139 // This call starts service if needed. 139 // This call starts service if needed.
140 bool GetPrinters(const PrintersCallback& enumerate_printers_callback); 140 bool GetPrinters(const PrintersCallback& enumerate_printers_callback);
141 141
142 private: 142 private:
143 // This class is responsible for launching the service process on the 143 // This class is responsible for launching the service process on the
144 // PROCESS_LAUNCHER thread. 144 // PROCESS_LAUNCHER thread.
145 class Launcher 145 class Launcher
146 : public base::RefCountedThreadSafe<ServiceProcessControl::Launcher> { 146 : public base::RefCountedThreadSafe<ServiceProcessControl::Launcher> {
147 public: 147 public:
148 Launcher(ServiceProcessControl* process, base::CommandLine* cmd_line); 148 Launcher(ServiceProcessControl* process,
149 scoped_ptr<base::CommandLine> cmd_line);
149 // Execute the command line to start the process asynchronously. After the 150 // Execute the command line to start the process asynchronously. After the
150 // command is executed |task| is called with the process handle on the UI 151 // command is executed |task| is called with the process handle on the UI
151 // thread. 152 // thread.
152 void Run(const base::Closure& task); 153 void Run(const base::Closure& task);
153 154
154 bool launched() const { return launched_; } 155 bool launched() const { return launched_; }
155 156
156 private: 157 private:
157 friend class base::RefCountedThreadSafe<ServiceProcessControl::Launcher>; 158 friend class base::RefCountedThreadSafe<ServiceProcessControl::Launcher>;
158 virtual ~Launcher(); 159 virtual ~Launcher();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // the service process. 229 // the service process.
229 base::Closure histograms_callback_; 230 base::Closure histograms_callback_;
230 231
231 content::NotificationRegistrar registrar_; 232 content::NotificationRegistrar registrar_;
232 233
233 // Callback that gets invoked if service didn't reply in time. 234 // Callback that gets invoked if service didn't reply in time.
234 base::CancelableClosure histograms_timeout_callback_; 235 base::CancelableClosure histograms_timeout_callback_;
235 }; 236 };
236 237
237 #endif // CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ 238 #endif // CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698