mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
Don’t use using directives (“using namespace”) in tools.
The contents of tools are moved into the namespace crashpad::(anonymous namespace). https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Namespaces R=rsesek@chromium.org Review URL: https://codereview.chromium.org/627273004
This commit is contained in:
parent
6d1af6922f
commit
40602fab1f
@ -35,10 +35,9 @@
|
||||
#include "util/posix/symbolic_constants_posix.h"
|
||||
#include "util/stdlib/string_number_conversion.h"
|
||||
|
||||
namespace crashpad {
|
||||
namespace {
|
||||
|
||||
using namespace crashpad;
|
||||
|
||||
struct Options {
|
||||
std::string file_path;
|
||||
std::string mach_service;
|
||||
@ -179,9 +178,7 @@ void Usage(const std::string& me) {
|
||||
ToolSupport::UsageTail(me);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int CatchExceptionToolMain(int argc, char* argv[]) {
|
||||
const std::string me(basename(argv[0]));
|
||||
|
||||
enum OptionFlags {
|
||||
@ -300,3 +297,10 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace crashpad
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
return crashpad::CatchExceptionToolMain(argc, argv);
|
||||
}
|
||||
|
@ -35,10 +35,9 @@
|
||||
#include "util/mach/symbolic_constants_mach.h"
|
||||
#include "util/stdlib/string_number_conversion.h"
|
||||
|
||||
namespace crashpad {
|
||||
namespace {
|
||||
|
||||
using namespace crashpad;
|
||||
|
||||
//! \brief Manages a pool of Mach send rights, deallocating all send rights upon
|
||||
//! destruction.
|
||||
//!
|
||||
@ -348,9 +347,7 @@ void Usage(const std::string& me) {
|
||||
ToolSupport::UsageTail(me);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int ExceptionPortToolMain(int argc, char* argv[]) {
|
||||
const std::string me(basename(argv[0]));
|
||||
|
||||
enum ExitCode {
|
||||
@ -587,3 +584,10 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
return kExitSuccess;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace crashpad
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
return crashpad::ExceptionPortToolMain(argc, argv);
|
||||
}
|
||||
|
@ -30,10 +30,9 @@
|
||||
#include "util/mac/service_management.h"
|
||||
#include "util/stdlib/objc.h"
|
||||
|
||||
namespace crashpad {
|
||||
namespace {
|
||||
|
||||
using namespace crashpad;
|
||||
|
||||
void Usage(const std::string& me) {
|
||||
fprintf(stderr,
|
||||
"Usage: %s -L -l LABEL [OPTION]... COMMAND [ARG]...\n"
|
||||
@ -52,9 +51,7 @@ void Usage(const std::string& me) {
|
||||
ToolSupport::UsageTail(me);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int OnDemandServiceToolMain(int argc, char* argv[]) {
|
||||
const std::string me(basename(argv[0]));
|
||||
|
||||
enum Operation {
|
||||
@ -190,3 +187,10 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace crashpad
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
return crashpad::OnDemandServiceToolMain(argc, argv);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user