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

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

Issue 2094913002: Make base::Environment::Create() return unique_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit, rebase Created 4 years, 5 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 (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 SANDBOX_LINUX_SUID_SETUID_SANDBOX_CLIENT_H_ 5 #ifndef SANDBOX_LINUX_SUID_CLIENT_SETUID_SANDBOX_CLIENT_H_
6 #define SANDBOX_LINUX_SUID_SETUID_SANDBOX_CLIENT_H_ 6 #define SANDBOX_LINUX_SUID_CLIENT_SETUID_SANDBOX_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/environment.h" 10 #include "base/environment.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "sandbox/sandbox_export.h" 12 #include "sandbox/sandbox_export.h"
13 13
14 namespace sandbox { 14 namespace sandbox {
15 15
16 // Helper class to use the setuid sandbox. This class is to be used 16 // Helper class to use the setuid sandbox. This class is to be used
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Did we get launched through the setuid helper ? 51 // Did we get launched through the setuid helper ?
52 bool IsSuidSandboxChild() const; 52 bool IsSuidSandboxChild() const;
53 // Did the setuid helper create a new PID namespace ? 53 // Did the setuid helper create a new PID namespace ?
54 bool IsInNewPIDNamespace() const; 54 bool IsInNewPIDNamespace() const;
55 // Did the setuid helper create a new network namespace ? 55 // Did the setuid helper create a new network namespace ?
56 bool IsInNewNETNamespace() const; 56 bool IsInNewNETNamespace() const;
57 // Are we done and fully sandboxed ? 57 // Are we done and fully sandboxed ?
58 bool IsSandboxed() const; 58 bool IsSandboxed() const;
59 59
60 private: 60 private:
61 explicit SetuidSandboxClient(base::Environment* env); 61 explicit SetuidSandboxClient(std::unique_ptr<base::Environment> env);
62 62
63 // Holds the environment. Will never be NULL. 63 // Holds the environment. Will never be NULL.
64 std::unique_ptr<base::Environment> env_; 64 std::unique_ptr<base::Environment> env_;
65 bool sandboxed_; 65 bool sandboxed_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(SetuidSandboxClient); 67 DISALLOW_COPY_AND_ASSIGN(SetuidSandboxClient);
68 }; 68 };
69 69
70 } // namespace sandbox 70 } // namespace sandbox
71 71
72 #endif // SANDBOX_LINUX_SUID_SETUID_SANDBOX_CLIENT_H_ 72 #endif // SANDBOX_LINUX_SUID_CLIENT_SETUID_SANDBOX_CLIENT_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux_unittest.cc ('k') | sandbox/linux/suid/client/setuid_sandbox_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698