mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Add namespaces in examples
This commit is contained in:
parent
a61421621c
commit
4379725696
|
@ -21,6 +21,8 @@
|
|||
#include "sandboxed_api/util/flag.h"
|
||||
#include "uv_sapi.sapi.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class UVSapiHelloworldSandbox : public uv::UVSandbox {
|
||||
private:
|
||||
std::unique_ptr<sandbox2::Policy> ModifyPolicy(
|
||||
|
@ -73,6 +75,8 @@ absl::Status HelloWorld() {
|
|||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include "sandboxed_api/util/flag.h"
|
||||
#include "uv_sapi.sapi.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class UVSapiIdleBasicSandbox : public uv::UVSandbox {
|
||||
private:
|
||||
std::unique_ptr<sandbox2::Policy> ModifyPolicy(
|
||||
|
@ -97,6 +99,8 @@ absl::Status IdleBasic() {
|
|||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include "sandboxed_api/util/flag.h"
|
||||
#include "uv_sapi.sapi.h"
|
||||
|
||||
namespace {
|
||||
|
||||
class UVSapiUVCatSandbox : public uv::UVSandbox {
|
||||
public:
|
||||
UVSapiUVCatSandbox(std::string filename) : filename(filename) {}
|
||||
|
@ -90,6 +92,8 @@ absl::Status UVCat(std::string filearg) {
|
|||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user