Add namespaces in examples

This commit is contained in:
Federico Stazi 2020-09-28 18:41:37 +00:00
parent a61421621c
commit 4379725696
3 changed files with 12 additions and 0 deletions

View File

@ -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]);

View File

@ -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]);

View File

@ -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]);