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

Side by Side Diff: chrome/common/service_process_util.h

Issue 1880143002: Convert chrome/common to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/common/safe_browsing/zip_analyzer.cc ('k') | chrome/common/service_process_util.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_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 <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
13 #include "base/process/process.h" 13 #include "base/process/process.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "ipc/ipc_channel_handle.h" 15 #include "ipc/ipc_channel_handle.h"
16 16
17 class MultiProcessLock; 17 class MultiProcessLock;
18 18
19 #if defined(OS_MACOSX) 19 #if defined(OS_MACOSX)
20 #ifdef __OBJC__ 20 #ifdef __OBJC__
21 @class NSString; 21 @class NSString;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // and not that the process is ready to receive IPC commands, or even running. 62 // and not that the process is ready to receive IPC commands, or even running.
63 // This method is only exposed for testing. 63 // This method is only exposed for testing.
64 bool GetServiceProcessData(std::string* version, base::ProcessId* pid); 64 bool GetServiceProcessData(std::string* version, base::ProcessId* pid);
65 // -------------------------------------------------------------------------- 65 // --------------------------------------------------------------------------
66 66
67 // Forces a service process matching the specified version to shut down. 67 // Forces a service process matching the specified version to shut down.
68 bool ForceServiceProcessShutdown(const std::string& version, 68 bool ForceServiceProcessShutdown(const std::string& version,
69 base::ProcessId process_id); 69 base::ProcessId process_id);
70 70
71 // Creates command-line to run the service process. 71 // Creates command-line to run the service process.
72 scoped_ptr<base::CommandLine> CreateServiceProcessCommandLine(); 72 std::unique_ptr<base::CommandLine> CreateServiceProcessCommandLine();
73 73
74 // This is a class that is used by the service process to signal events and 74 // This is a class that is used by the service process to signal events and
75 // share data with external clients. This class lives in this file because the 75 // share data with external clients. This class lives in this file because the
76 // internal data structures and mechanisms used by the utility methods above 76 // internal data structures and mechanisms used by the utility methods above
77 // and this class are shared. 77 // and this class are shared.
78 class ServiceProcessState { 78 class ServiceProcessState {
79 public: 79 public:
80 ServiceProcessState(); 80 ServiceProcessState();
81 ~ServiceProcessState(); 81 ~ServiceProcessState();
82 82
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Creates the platform specific state. 122 // Creates the platform specific state.
123 void CreateState(); 123 void CreateState();
124 124
125 // Tear down the platform specific state. 125 // Tear down the platform specific state.
126 void TearDownState(); 126 void TearDownState();
127 127
128 // An opaque object that maintains state. The actual definition of this is 128 // An opaque object that maintains state. The actual definition of this is
129 // platform dependent. 129 // platform dependent.
130 struct StateData; 130 struct StateData;
131 StateData* state_; 131 StateData* state_;
132 scoped_ptr<base::SharedMemory> shared_mem_service_data_; 132 std::unique_ptr<base::SharedMemory> shared_mem_service_data_;
133 scoped_ptr<base::CommandLine> autorun_command_line_; 133 std::unique_ptr<base::CommandLine> autorun_command_line_;
134 }; 134 };
135 135
136 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ 136 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/common/safe_browsing/zip_analyzer.cc ('k') | chrome/common/service_process_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698