buffet: Pass CommandManager instance to DeviceRegistrationInfo

In order to generate device draft for device registration with
GCD cloud server, DeviceRegistrationInfo class needs access
to CommandManager class to get the CDD for supported commands.

BUG=chromium:396716
TEST=USE=buffet P2_TEST_FILTER="buffet::*" FEATURES=test emerge-link platform2

Change-Id: I076249a890dc865f3af119315ab1c1c50c6edcf4
Reviewed-on: https://chromium-review.googlesource.com/209564
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/device_registration_info.cc b/buffet/device_registration_info.cc
index 0225a5b..0ec3de7 100644
--- a/buffet/device_registration_info.cc
+++ b/buffet/device_registration_info.cc
@@ -137,17 +137,22 @@
 
 namespace buffet {
 
-DeviceRegistrationInfo::DeviceRegistrationInfo()
+DeviceRegistrationInfo::DeviceRegistrationInfo(
+    const std::shared_ptr<CommandManager>& command_manager)
     : transport_(new http::curl::Transport()),
       // TODO(avakulenko): Figure out security implications of storing
       // this data unencrypted.
-      storage_(new FileStorage(base::FilePath(kDeviceInfoFilePath))) {
+      storage_(new FileStorage(base::FilePath(kDeviceInfoFilePath))),
+      command_manager_(command_manager) {
 }
 
 DeviceRegistrationInfo::DeviceRegistrationInfo(
-    std::shared_ptr<http::Transport> transport,
-    std::shared_ptr<StorageInterface> storage) : transport_(transport),
-                                                 storage_(storage) {
+    const std::shared_ptr<CommandManager>& command_manager,
+    const std::shared_ptr<http::Transport>& transport,
+    const std::shared_ptr<StorageInterface>& storage)
+    : transport_(transport),
+      storage_(storage),
+      command_manager_(command_manager) {
 }
 
 std::pair<std::string, std::string>