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

Side by Side Diff: chrome/common/service_process_util_posix.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/service_process_util_mac.mm ('k') | chrome/common/service_process_util_posix.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_POSIX_H_ 5 #ifndef CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_
6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ 6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_
7 7
8 #include "chrome/common/service_process_util.h" 8 #include "chrome/common/service_process_util.h"
9 9
10 #include <signal.h> 10 #include <signal.h>
11 11
12 #include <memory>
13
12 #include "base/callback.h" 14 #include "base/callback.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 17
17 #if defined(OS_POSIX) && !defined(OS_MACOSX) 18 #if defined(OS_POSIX) && !defined(OS_MACOSX)
18 #include "chrome/common/multi_process_lock.h" 19 #include "chrome/common/multi_process_lock.h"
19 MultiProcessLock* TakeServiceRunningLock(bool waiting); 20 MultiProcessLock* TakeServiceRunningLock(bool waiting);
20 #endif 21 #endif
21 22
22 #if defined(OS_MACOSX) 23 #if defined(OS_MACOSX)
23 #include "base/files/file_path_watcher.h" 24 #include "base/files/file_path_watcher.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // to be monitoring it. 65 // to be monitoring it.
65 void SignalReady(base::WaitableEvent* signal, bool* success); 66 void SignalReady(base::WaitableEvent* signal, bool* success);
66 67
67 #if defined(OS_MACOSX) 68 #if defined(OS_MACOSX)
68 bool WatchExecutable(); 69 bool WatchExecutable();
69 70
70 base::ScopedCFTypeRef<CFDictionaryRef> launchd_conf; 71 base::ScopedCFTypeRef<CFDictionaryRef> launchd_conf;
71 base::FilePathWatcher executable_watcher; 72 base::FilePathWatcher executable_watcher;
72 #endif // OS_MACOSX 73 #endif // OS_MACOSX
73 #if defined(OS_POSIX) && !defined(OS_MACOSX) 74 #if defined(OS_POSIX) && !defined(OS_MACOSX)
74 scoped_ptr<MultiProcessLock> initializing_lock; 75 std::unique_ptr<MultiProcessLock> initializing_lock;
75 scoped_ptr<MultiProcessLock> running_lock; 76 std::unique_ptr<MultiProcessLock> running_lock;
76 #endif 77 #endif
77 scoped_ptr<ServiceProcessTerminateMonitor> terminate_monitor; 78 std::unique_ptr<ServiceProcessTerminateMonitor> terminate_monitor;
78 base::MessageLoopForIO::FileDescriptorWatcher watcher; 79 base::MessageLoopForIO::FileDescriptorWatcher watcher;
79 int sockets[2]; 80 int sockets[2];
80 struct sigaction old_action; 81 struct sigaction old_action;
81 bool set_action; 82 bool set_action;
82 83
83 protected: 84 protected:
84 friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>; 85 friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>;
85 virtual ~StateData(); 86 virtual ~StateData();
86 }; 87 };
87 88
88 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ 89 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_
OLDNEW
« no previous file with comments | « chrome/common/service_process_util_mac.mm ('k') | chrome/common/service_process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698