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 "sandboxed_api/util/flag.h"
|
||||||
#include "uv_sapi.sapi.h"
|
#include "uv_sapi.sapi.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
class UVSapiHelloworldSandbox : public uv::UVSandbox {
|
class UVSapiHelloworldSandbox : public uv::UVSandbox {
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<sandbox2::Policy> ModifyPolicy(
|
std::unique_ptr<sandbox2::Policy> ModifyPolicy(
|
||||||
|
@ -73,6 +75,8 @@ absl::Status HelloWorld() {
|
||||||
return absl::OkStatus();
|
return absl::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||||
google::InitGoogleLogging(argv[0]);
|
google::InitGoogleLogging(argv[0]);
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "sandboxed_api/util/flag.h"
|
#include "sandboxed_api/util/flag.h"
|
||||||
#include "uv_sapi.sapi.h"
|
#include "uv_sapi.sapi.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
class UVSapiIdleBasicSandbox : public uv::UVSandbox {
|
class UVSapiIdleBasicSandbox : public uv::UVSandbox {
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<sandbox2::Policy> ModifyPolicy(
|
std::unique_ptr<sandbox2::Policy> ModifyPolicy(
|
||||||
|
@ -97,6 +99,8 @@ absl::Status IdleBasic() {
|
||||||
return absl::OkStatus();
|
return absl::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||||
google::InitGoogleLogging(argv[0]);
|
google::InitGoogleLogging(argv[0]);
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "sandboxed_api/util/flag.h"
|
#include "sandboxed_api/util/flag.h"
|
||||||
#include "uv_sapi.sapi.h"
|
#include "uv_sapi.sapi.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
class UVSapiUVCatSandbox : public uv::UVSandbox {
|
class UVSapiUVCatSandbox : public uv::UVSandbox {
|
||||||
public:
|
public:
|
||||||
UVSapiUVCatSandbox(std::string filename) : filename(filename) {}
|
UVSapiUVCatSandbox(std::string filename) : filename(filename) {}
|
||||||
|
@ -90,6 +92,8 @@ absl::Status UVCat(std::string filearg) {
|
||||||
return absl::OkStatus();
|
return absl::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||||
google::InitGoogleLogging(argv[0]);
|
google::InitGoogleLogging(argv[0]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user