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

Side by Side Diff: sandbox/linux/suid/client/setuid_sandbox_host.h

Issue 1849323003: Convert //sandbox to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixup nonsfi_sandbox_unittest.cc 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SANDBOX_LINUX_SUID_SETUID_SANDBOX_HOST_H_ 5 #ifndef SANDBOX_LINUX_SUID_SETUID_SANDBOX_HOST_H_
6 #define SANDBOX_LINUX_SUID_SETUID_SANDBOX_HOST_H_ 6 #define SANDBOX_LINUX_SUID_SETUID_SANDBOX_HOST_H_
7 7
8 #include <memory>
9
8 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
9 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/process/launch.h" 13 #include "base/process/launch.h"
13 #include "sandbox/sandbox_export.h" 14 #include "sandbox/sandbox_export.h"
14 15
15 namespace sandbox { 16 namespace sandbox {
16 17
17 // Helper class to use the setuid sandbox. This class is to be used 18 // Helper class to use the setuid sandbox. This class is to be used
18 // before launching the setuid helper. 19 // before launching the setuid helper.
19 // This class is difficult to use. It has been created by refactoring very old 20 // This class is difficult to use. It has been created by refactoring very old
20 // code scathered through the Chromium code base. 21 // code scathered through the Chromium code base.
21 // 22 //
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 base::FileHandleMappingVector* fds_to_remap, 54 base::FileHandleMappingVector* fds_to_remap,
54 base::ScopedFD* dummy_fd); 55 base::ScopedFD* dummy_fd);
55 // Set-up the environment. This should be done prior to launching the setuid 56 // Set-up the environment. This should be done prior to launching the setuid
56 // helper. 57 // helper.
57 void SetupLaunchEnvironment(); 58 void SetupLaunchEnvironment();
58 59
59 private: 60 private:
60 explicit SetuidSandboxHost(base::Environment* env); 61 explicit SetuidSandboxHost(base::Environment* env);
61 62
62 // Holds the environment. Will never be NULL. 63 // Holds the environment. Will never be NULL.
63 scoped_ptr<base::Environment> env_; 64 std::unique_ptr<base::Environment> env_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(SetuidSandboxHost); 66 DISALLOW_COPY_AND_ASSIGN(SetuidSandboxHost);
66 }; 67 };
67 68
68 } // namespace sandbox 69 } // namespace sandbox
69 70
70 #endif // SANDBOX_LINUX_SUID_SETUID_SANDBOX_HOST_H_ 71 #endif // SANDBOX_LINUX_SUID_SETUID_SANDBOX_HOST_H_
OLDNEW
« no previous file with comments | « sandbox/linux/suid/client/setuid_sandbox_client_unittest.cc ('k') | sandbox/linux/suid/client/setuid_sandbox_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698