[cs] Rename DebugDirectory to SystemObjectsDirectory

The name of this object is super confusing and I keep forgetting it
because it doesn't correspond to what it is. I've renamed this to help
me remember.

Change-Id: I1536675b6902ddcd0186a561627d07f5480c29b5
Bug: CF-283
Test: None, mechanical move.
diff --git a/bin/appmgr/BUILD.gn b/bin/appmgr/BUILD.gn
index 10aa531..80df6f7 100644
--- a/bin/appmgr/BUILD.gn
+++ b/bin/appmgr/BUILD.gn
@@ -8,8 +8,6 @@
   sources = [
     "component_controller_impl.cc",
     "component_controller_impl.h",
-    "debug_directory.cc",
-    "debug_directory.h",
     "debug_info_retriever.cc",
     "debug_info_retriever.h",
     "dynamic_library_loader.cc",
@@ -38,6 +36,8 @@
     "scheme_map.h",
     "service_provider_dir_impl.cc",
     "service_provider_dir_impl.h",
+    "system_objects_directory.cc",
+    "system_objects_directory.h",
     "util.cc",
     "util.h",
   ]
diff --git a/bin/appmgr/component_controller_impl.cc b/bin/appmgr/component_controller_impl.cc
index fa2b0dd..93d0d5b 100644
--- a/bin/appmgr/component_controller_impl.cc
+++ b/bin/appmgr/component_controller_impl.cc
@@ -188,14 +188,14 @@
       koid_(std::to_string(fsl::GetKoid(process_.get()))),
       wait_(this, process_.get(), ZX_TASK_TERMINATED),
       termination_callback_(std::move(termination_callback)),
-      debug_directory_(DuplicateProcess(process_)) {
+      system_objects_directory_(DuplicateProcess(process_)) {
   zx_status_t status = wait_.Begin(async_get_default_dispatcher());
   FXL_DCHECK(status == ZX_OK);
 
   hub()->SetJobId(std::to_string(fsl::GetKoid(job_.get())));
   hub()->SetProcessId(koid_);
 
-  hub()->AddEntry("system_objects", debug_directory_.object());
+  hub()->AddEntry("system_objects", system_objects_directory_.object());
 
   hub()->AddIncomingServices(this->incoming_services());
 }
diff --git a/bin/appmgr/component_controller_impl.h b/bin/appmgr/component_controller_impl.h
index 2d9bbe7..0374647 100644
--- a/bin/appmgr/component_controller_impl.h
+++ b/bin/appmgr/component_controller_impl.h
@@ -12,11 +12,11 @@
 #include <zircon/assert.h>
 
 #include "garnet/bin/appmgr/component_container.h"
-#include "garnet/bin/appmgr/debug_directory.h"
 #include "garnet/bin/appmgr/debug_info_retriever.h"
 #include "garnet/bin/appmgr/hub/component_hub.h"
 #include "garnet/bin/appmgr/hub/hub_info.h"
 #include "garnet/bin/appmgr/namespace.h"
+#include "garnet/bin/appmgr/system_objects_directory.h"
 
 #include "lib/fidl/cpp/binding.h"
 #include "lib/fxl/macros.h"
@@ -186,7 +186,7 @@
 
   TerminationCallback termination_callback_;
 
-  DebugDirectory debug_directory_;
+  SystemObjectsDirectory system_objects_directory_;
 
   FXL_DISALLOW_COPY_AND_ASSIGN(ComponentControllerImpl);
 };
diff --git a/bin/appmgr/debug_directory.cc b/bin/appmgr/system_objects_directory.cc
similarity index 91%
rename from bin/appmgr/debug_directory.cc
rename to bin/appmgr/system_objects_directory.cc
index 7ced02d..63634d0 100644
--- a/bin/appmgr/debug_directory.cc
+++ b/bin/appmgr/system_objects_directory.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "debug_directory.h"
+#include "system_objects_directory.h"
 
 #include <fs/pseudo-file.h>
 #include <lib/fxl/strings/string_printf.h>
@@ -13,7 +13,8 @@
 
 namespace component {
 
-DebugDirectory::ProcessThreads::ProcessThreads(const zx::process* process)
+SystemObjectsDirectory::ProcessThreads::ProcessThreads(
+    const zx::process* process)
     : ExposedObject("threads"), process_(process) {
   auto all_dir = component::ObjectDir::Make("all_thread_stacks");
   all_dir.set_prop("stacks", [this]() -> std::string {
@@ -46,7 +47,8 @@
       });
 }
 
-void DebugDirectory::ProcessThreads::GetThreads(fbl::Vector<ThreadInfo>* out) {
+void SystemObjectsDirectory::ProcessThreads::GetThreads(
+    fbl::Vector<ThreadInfo>* out) {
   zx_koid_t thread_ids[kMaxThreads];
   size_t num_ids;
   if (process_->get_info(ZX_INFO_PROCESS_THREADS, thread_ids,
diff --git a/bin/appmgr/debug_directory.h b/bin/appmgr/system_objects_directory.h
similarity index 77%
rename from bin/appmgr/debug_directory.h
rename to bin/appmgr/system_objects_directory.h
index 5826b7a..14c7514 100644
--- a/bin/appmgr/debug_directory.h
+++ b/bin/appmgr/system_objects_directory.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef GARNET_BIN_APPMGR_DEBUG_DIRECTORY_H_
-#define GARNET_BIN_APPMGR_DEBUG_DIRECTORY_H_
+#ifndef GARNET_BIN_APPMGR_SYSTEM_OBJECTS_DIRECTORY_H_
+#define GARNET_BIN_APPMGR_SYSTEM_OBJECTS_DIRECTORY_H_
 
 #include <fbl/string.h>
 #include <fs/lazy-dir.h>
@@ -14,10 +14,10 @@
 
 namespace component {
 
-class DebugDirectory : public component::ExposedObject {
+class SystemObjectsDirectory : public component::ExposedObject {
  public:
-  explicit DebugDirectory(zx::process process)
-      : ExposedObject("debug_objects"),
+  explicit SystemObjectsDirectory(zx::process process)
+      : ExposedObject("system_objects"),
         process_(std::move(process)),
         threads_(std::make_unique<ProcessThreads>(&process_)) {
     add_child(threads_.get());
@@ -49,4 +49,4 @@
 
 }  // namespace component
 
-#endif  // GARNET_BIN_APPMGR_DEBUG_DIRECTORY_H_
+#endif  // GARNET_BIN_APPMGR_SYSTEM_OBJECTS_DIRECTORY_H_