diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/s/commands/cluster_profile_cmd.cpp | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/s/commands/cluster_profile_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_profile_cmd.cpp | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/src/mongo/s/commands/cluster_profile_cmd.cpp b/src/mongo/s/commands/cluster_profile_cmd.cpp index e4084def78b..ca619d80fbe 100644 --- a/src/mongo/s/commands/cluster_profile_cmd.cpp +++ b/src/mongo/s/commands/cluster_profile_cmd.cpp @@ -33,43 +33,41 @@ namespace mongo { namespace { - class ProfileCmd : public Command { - public: - ProfileCmd() : Command("profile", false) { } +class ProfileCmd : public Command { +public: + ProfileCmd() : Command("profile", false) {} - virtual bool slaveOk() const { - return true; - } + virtual bool slaveOk() const { + return true; + } - virtual bool adminOnly() const { - return false; - } + virtual bool adminOnly() const { + return false; + } - virtual bool isWriteCommandForConfigServer() const { - return false; - } + virtual bool isWriteCommandForConfigServer() const { + return false; + } - virtual void addRequiredPrivileges(const std::string& dbname, - const BSONObj& cmdObj, - std::vector<Privilege>* out) { + virtual void addRequiredPrivileges(const std::string& dbname, + const BSONObj& cmdObj, + std::vector<Privilege>* out) { + ActionSet actions; + actions.addAction(ActionType::enableProfiler); + out->push_back(Privilege(ResourcePattern::forDatabaseName(dbname), actions)); + } - ActionSet actions; - actions.addAction(ActionType::enableProfiler); - out->push_back(Privilege(ResourcePattern::forDatabaseName(dbname), actions)); - } + virtual bool run(OperationContext* txn, + const std::string& dbname, + BSONObj& cmdObj, + int options, + std::string& errmsg, + BSONObjBuilder& result) { + errmsg = "profile currently not supported via mongos"; + return false; + } - virtual bool run(OperationContext* txn, - const std::string& dbname, - BSONObj& cmdObj, - int options, - std::string& errmsg, - BSONObjBuilder& result) { +} profileCmd; - errmsg = "profile currently not supported via mongos"; - return false; - } - - } profileCmd; - -} // namespace -} // namespace mongo +} // namespace +} // namespace mongo |