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

Side by Side Diff: chrome/common/service_process_util.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_COMMON_SERVICE_PROCESS_UTIL_H_ 5 #ifndef CHROME_COMMON_SERVICE_PROCESS_UTIL_H_
6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ 6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // a true return value only means that some process shared data was available, 67 // a true return value only means that some process shared data was available,
68 // and not that the process is ready to receive IPC commands, or even running. 68 // and not that the process is ready to receive IPC commands, or even running.
69 // This method is only exposed for testing. 69 // This method is only exposed for testing.
70 bool GetServiceProcessData(std::string* version, base::ProcessId* pid); 70 bool GetServiceProcessData(std::string* version, base::ProcessId* pid);
71 // -------------------------------------------------------------------------- 71 // --------------------------------------------------------------------------
72 72
73 // Forces a service process matching the specified version to shut down. 73 // Forces a service process matching the specified version to shut down.
74 bool ForceServiceProcessShutdown(const std::string& version, 74 bool ForceServiceProcessShutdown(const std::string& version,
75 base::ProcessId process_id); 75 base::ProcessId process_id);
76 76
77 // Creates command-line to run the service process.
78 scoped_ptr<base::CommandLine> CreateServiceProcessCommandLine();
79
77 // This is a class that is used by the service process to signal events and 80 // This is a class that is used by the service process to signal events and
78 // share data with external clients. This class lives in this file because the 81 // share data with external clients. This class lives in this file because the
79 // internal data structures and mechanisms used by the utility methods above 82 // internal data structures and mechanisms used by the utility methods above
80 // and this class are shared. 83 // and this class are shared.
81 class ServiceProcessState { 84 class ServiceProcessState {
82 public: 85 public:
83 ServiceProcessState(); 86 ServiceProcessState();
84 ~ServiceProcessState(); 87 ~ServiceProcessState();
85 88
86 // Tries to become the sole service process for the current user data dir. 89 // Tries to become the sole service process for the current user data dir.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // means that a service process instance is already running. 125 // means that a service process instance is already running.
123 bool TakeSingletonLock(); 126 bool TakeSingletonLock();
124 #endif // !OS_MACOSX 127 #endif // !OS_MACOSX
125 128
126 // Creates the platform specific state. 129 // Creates the platform specific state.
127 void CreateState(); 130 void CreateState();
128 131
129 // Tear down the platform specific state. 132 // Tear down the platform specific state.
130 void TearDownState(); 133 void TearDownState();
131 134
132 // Initializes the command-line that can be used to autorun the service
133 // process.
134 void CreateAutoRunCommandLine();
135
136 // An opaque object that maintains state. The actual definition of this is 135 // An opaque object that maintains state. The actual definition of this is
137 // platform dependent. 136 // platform dependent.
138 struct StateData; 137 struct StateData;
139 StateData* state_; 138 StateData* state_;
140 scoped_ptr<base::SharedMemory> shared_mem_service_data_; 139 scoped_ptr<base::SharedMemory> shared_mem_service_data_;
141 scoped_ptr<base::CommandLine> autorun_command_line_; 140 scoped_ptr<base::CommandLine> autorun_command_line_;
142 }; 141 };
143 142
144 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ 143 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698