buffet: Add the ability to change command visibility

Now it is possible to change the visibility of command and make it
visible to cloud only, local only, both or none.

BUG=brillo:797
TEST=`FEATURES=test emerge-link buffet`

Change-Id: I81d526b3d43adf5d6cd03a4e31a31e1494ff5c1b
Reviewed-on: https://chromium-review.googlesource.com/266396
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
diff --git a/buffet/commands/command_dictionary.cc b/buffet/commands/command_dictionary.cc
index f2b6f2f..3ab57a5 100644
--- a/buffet/commands/command_dictionary.cc
+++ b/buffet/commands/command_dictionary.cc
@@ -235,6 +235,12 @@
   return (pair != definitions_.end()) ? pair->second.get() : nullptr;
 }
 
+CommandDefinition* CommandDictionary::FindCommand(
+    const std::string& command_name) {
+  auto pair = definitions_.find(command_name);
+  return (pair != definitions_.end()) ? pair->second.get() : nullptr;
+}
+
 void CommandDictionary::Clear() {
   definitions_.clear();
 }