Merge "Drop the "-host" suffix on libchrome and libbrillo."
diff --git a/chromeos-dbus-bindings/proxy_generator.cc b/chromeos-dbus-bindings/proxy_generator.cc
index 9ce0117..3a9cce1 100644
--- a/chromeos-dbus-bindings/proxy_generator.cc
+++ b/chromeos-dbus-bindings/proxy_generator.cc
@@ -211,6 +211,10 @@
     AddSignalHandlerRegistration(signal, interface.name, true, text);
   }
   AddProperties(config, interface, true, text);
+  text->AddBlankLine();
+  text->AddLine("virtual const dbus::ObjectPath& GetObjectPath() const = 0;");
+  if (!config.object_manager.name.empty() && !interface.properties.empty())
+    AddPropertyPublicMethods(proxy_name, true, text);
 
   text->PopOffset();
   text->AddLine("};");
@@ -248,7 +252,7 @@
   AddGetObjectPath(text);
   AddGetObjectProxy(text);
   if (!config.object_manager.name.empty() && !interface.properties.empty())
-    AddPropertyPublicMethods(proxy_name, text);
+    AddPropertyPublicMethods(proxy_name, false, text);
   for (const auto& method : interface.methods) {
     AddMethodProxy(method, interface.name, false, text);
     AddAsyncMethodProxy(method, interface.name, false, text);
@@ -277,9 +281,10 @@
   }
   if (!config.object_manager.name.empty() && !interface.properties.empty()) {
     text->AddLine("PropertySet* property_set_;");
-    text->AddLine(StringPrintf("base::Callback<void(%s*, const std::string&)> "
-                               "on_property_changed_;",
-                               proxy_name.c_str()));
+    text->AddLine(
+        StringPrintf("base::Callback<void(%sInterface*, const std::string&)> "
+                     "on_property_changed_;",
+                     proxy_name.c_str()));
   }
   text->AddLine("dbus::ObjectProxy* dbus_object_proxy_;");
   text->AddBlankLine();
@@ -338,6 +343,21 @@
     string name = NameParser{prop.name}.MakeVariableName();
     text->AddLine(StringPrintf("MOCK_CONST_METHOD0(%s, %s());",
                                name.c_str(), type.c_str()));
+    if (prop.access == "readwrite") {
+      text->AddLine(StringPrintf("MOCK_METHOD2(set_%s, void(%s, "
+                                 "const base::Callback<bool>&));",
+                                 name.c_str(), type.c_str()));
+    }
+  }
+  text->AddLine(
+      "MOCK_CONST_METHOD0(GetObjectPath, const dbus::ObjectPath&());");
+  if (!config.object_manager.name.empty() && !interface.properties.empty()) {
+    text->AddLineAndPushOffsetTo(
+        "MOCK_CONST_METHOD1(SetPropertyChangedCallback,", 1, '(');
+    text->AddLine(StringPrintf(
+        "void(const base::Callback<void(%sInterface*, const std::string&)>&));",
+        proxy_name.c_str()));
+    text->PopOffset();
   }
 
   text->PopOffset();
@@ -416,7 +436,7 @@
 // static
 void ProxyGenerator::AddGetObjectPath(IndentedText* text) {
   text->AddBlankLine();
-  text->AddLine("const dbus::ObjectPath& GetObjectPath() const {");
+  text->AddLine("const dbus::ObjectPath& GetObjectPath() const override {");
   text->AddLineWithOffset("return object_path_;", kBlockOffset);
   text->AddLine("}");
 }
@@ -430,20 +450,26 @@
 
 // static
 void ProxyGenerator::AddPropertyPublicMethods(const string& class_name,
+                                              bool declaration_only,
                                               IndentedText* text) {
   text->AddBlankLine();
-  text->AddLine("void SetPropertyChangedCallback(");
+  text->AddLine(StringPrintf("%svoid SetPropertyChangedCallback(",
+                             declaration_only ? "virtual " : ""));
   text->AddLineWithOffset(
-      StringPrintf("const base::Callback<void(%s*, "
-                   "const std::string&)>& callback) {", class_name.c_str()),
+      StringPrintf("const base::Callback<void(%sInterface*, "
+                   "const std::string&)>& callback) %s",
+                   class_name.c_str(),
+                   declaration_only ? "= 0;" : "override {"),
       kLineContinuationOffset);
-  text->AddLineWithOffset("on_property_changed_ = callback;", kBlockOffset);
-  text->AddLine("}");
-  text->AddBlankLine();
+  if (!declaration_only) {
+    text->AddLineWithOffset("on_property_changed_ = callback;", kBlockOffset);
+    text->AddLine("}");
+    text->AddBlankLine();
 
-  text->AddLine("const PropertySet* GetProperties() const "
-                "{ return property_set_; }");
-  text->AddLine("PropertySet* GetProperties() { return property_set_; }");
+    text->AddLine(
+        "const PropertySet* GetProperties() const { return property_set_; }");
+    text->AddLine("PropertySet* GetProperties() { return property_set_; }");
+  }
 }
 
 // static
@@ -583,6 +609,26 @@
           kBlockOffset);
       text->AddLine("}");
     }
+    if (prop.access == "readwrite") {
+      if (!declaration_only)
+        text->AddBlankLine();
+      text->AddLineAndPushOffsetTo(
+          StringPrintf("%svoid set_%s(%s value,",
+                       declaration_only ? "virtual " : "",
+                       name.c_str(),
+                       type.c_str()),
+          1, '(');
+      text->AddLine(
+          StringPrintf("const base::Callback<void(bool)>& callback)%s",
+                       declaration_only ? " = 0;" : " override {"));
+      text->PopOffset();
+      if (!declaration_only) {
+        text->AddLineWithOffset(
+            StringPrintf("property_set_->%s.Set(value, callback);", name.c_str()),
+            kBlockOffset);
+        text->AddLine("}");
+      }
+    }
   }
 }
 
@@ -1012,7 +1058,7 @@
   // GetProxy().
   if (interface.path.empty()) {
     // We have no fixed path, so there could be multiple instances of this itf.
-    text->AddLine(StringPrintf("%s* Get%s(",
+    text->AddLine(StringPrintf("%sInterface* Get%s(",
                                 itf_name.MakeProxyName(true).c_str(),
                                 itf_name.MakeProxyName(false).c_str()));
     text->PushOffset(kLineContinuationOffset);
@@ -1031,7 +1077,7 @@
   } else {
     // We have a fixed path, so the object could be considered a "singleton".
     // Skip the object_path parameter and return the first available instance.
-    text->AddLine(StringPrintf("%s* Get%s() {",
+    text->AddLine(StringPrintf("%sInterface* Get%s() {",
                                 itf_name.MakeProxyName(true).c_str(),
                                 itf_name.MakeProxyName(false).c_str()));
     text->PushOffset(kBlockOffset);
@@ -1044,11 +1090,12 @@
   }
 
   // GetInstances().
-  text->AddLine(StringPrintf("std::vector<%s*> Get%sInstances() const {",
-                              itf_name.MakeProxyName(true).c_str(),
-                              itf_name.type_name.c_str()));
+  text->AddLine(
+      StringPrintf("std::vector<%sInterface*> Get%sInstances() const {",
+                   itf_name.MakeProxyName(true).c_str(),
+                   itf_name.type_name.c_str()));
   text->PushOffset(kBlockOffset);
-  text->AddLine(StringPrintf("std::vector<%s*> values;",
+  text->AddLine(StringPrintf("std::vector<%sInterface*> values;",
                              itf_name.MakeProxyName(true).c_str()));
   text->AddLine(StringPrintf("values.reserve(%s.size());", map_name.c_str()));
   text->AddLine(StringPrintf("for (const auto& pair : %s)", map_name.c_str()));
@@ -1062,18 +1109,18 @@
                               itf_name.type_name.c_str()));
   text->PushOffset(kLineContinuationOffset);
   text->AddLine(
-      StringPrintf("const base::Callback<void(%s*)>& callback) {",
-                    itf_name.MakeProxyName(true).c_str()));
+      StringPrintf("const base::Callback<void(%sInterface*)>& callback) {",
+                   itf_name.MakeProxyName(true).c_str()));
   text->PopOffset();
   text->PushOffset(kBlockOffset);
   text->AddLine(StringPrintf("on_%s_added_ = callback;",
-                              itf_name.MakeVariableName().c_str()));
+                             itf_name.MakeVariableName().c_str()));
   text->PopOffset();
   text->AddLine("}");
 
   // SetRemovedCallback().
   text->AddLine(StringPrintf("void Set%sRemovedCallback(",
-                              itf_name.type_name.c_str()));
+                             itf_name.type_name.c_str()));
   text->PushOffset(kLineContinuationOffset);
   text->AddLine("const base::Callback<void(const dbus::ObjectPath&)>& "
                 "callback) {");
@@ -1284,9 +1331,10 @@
                                itf_name.MakeProxyName(true).c_str(),
                                var_name.c_str()));
     text->PopOffset();
-    text->AddLine(StringPrintf("base::Callback<void(%s*)> on_%s_added_;",
-                               itf_name.MakeProxyName(true).c_str(),
-                               var_name.c_str()));
+    text->AddLine(
+        StringPrintf("base::Callback<void(%sInterface*)> on_%s_added_;",
+                     itf_name.MakeProxyName(true).c_str(),
+                     var_name.c_str()));
     text->AddLine(StringPrintf("base::Callback<void(const dbus::ObjectPath&)> "
                                "on_%s_removed_;",
                                var_name.c_str()));
diff --git a/chromeos-dbus-bindings/proxy_generator.h b/chromeos-dbus-bindings/proxy_generator.h
index d6cfbaf..57af0e0 100644
--- a/chromeos-dbus-bindings/proxy_generator.h
+++ b/chromeos-dbus-bindings/proxy_generator.h
@@ -75,6 +75,7 @@
 
   // Generates SetPropertyChangedCallback/GetProperties() methods.
   static void AddPropertyPublicMethods(const std::string& class_name,
+                                       bool declaration_only,
                                        IndentedText* text);
 
   // Generates OnPropertyChanged() method.
diff --git a/chromeos-dbus-bindings/proxy_generator_mock_unittest.cc b/chromeos-dbus-bindings/proxy_generator_mock_unittest.cc
index 76f0ee5..6ba24ca 100644
--- a/chromeos-dbus-bindings/proxy_generator_mock_unittest.cc
+++ b/chromeos-dbus-bindings/proxy_generator_mock_unittest.cc
@@ -123,6 +123,7 @@
                void(const base::Callback<void(const std::vector<std::string>&,
                                               uint8_t)>& /*signal_callback*/,
                     dbus::ObjectProxy::OnConnectedCallback /*on_connected_callback*/));
+  MOCK_CONST_METHOD0(GetObjectPath, const dbus::ObjectPath&());
 
  private:
   DISALLOW_COPY_AND_ASSIGN(TestInterfaceProxyMock);
@@ -147,6 +148,12 @@
                void(const base::Callback<void(const std::string& /*name*/, int32_t /*age*/)>& /*success_callback*/,
                     const base::Callback<void(brillo::Error*)>& /*error_callback*/,
                     int /*timeout_ms*/));
+  MOCK_CONST_METHOD0(data, const std::string&());
+  MOCK_CONST_METHOD0(name, const std::string&());
+  MOCK_METHOD2(set_name, void(const std::string&, const base::Callback<bool>&));
+  MOCK_CONST_METHOD0(GetObjectPath, const dbus::ObjectPath&());
+  MOCK_CONST_METHOD1(SetPropertyChangedCallback,
+                     void(const base::Callback<void(TestInterface2ProxyInterface*, const std::string&)>&));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(TestInterface2ProxyMock);
@@ -224,10 +231,13 @@
       vector<Interface::Argument>{
           {"name", kDBusTypeString},
           {"age", kDBusTypeInt32}});
+  interface2.properties.emplace_back("Data", "s", "read");
+  interface2.properties.emplace_back("Name", "s", "readwrite");
   vector<Interface> interfaces{interface, interface2};
   base::FilePath output_path = temp_dir_.path().Append("output.h");
   base::FilePath proxy_path = temp_dir_.path().Append("proxies.h");
   ServiceConfig config;
+  config.object_manager.name = "ObjectManager";
   EXPECT_TRUE(ProxyGenerator::GenerateMocks(config, interfaces, output_path,
                                             proxy_path, false));
   string contents;
diff --git a/chromeos-dbus-bindings/proxy_generator_unittest.cc b/chromeos-dbus-bindings/proxy_generator_unittest.cc
index ccbd1fe..4eda77c 100644
--- a/chromeos-dbus-bindings/proxy_generator_unittest.cc
+++ b/chromeos-dbus-bindings/proxy_generator_unittest.cc
@@ -117,6 +117,8 @@
       const base::Callback<void(const std::vector<std::string>&,
                                 uint8_t)>& signal_callback,
       dbus::ObjectProxy::OnConnectedCallback on_connected_callback) = 0;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
 };
 
 }  // namespace chromium
@@ -167,7 +169,7 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
@@ -325,6 +327,8 @@
       const base::Callback<void(const std::string& /*name*/, int32_t /*age*/)>& success_callback,
       const base::Callback<void(brillo::Error*)>& error_callback,
       int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
 };
 
 }  // namespace chromium
@@ -354,7 +358,7 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
@@ -434,6 +438,8 @@
   virtual void RegisterCloserSignalHandler(
       const base::Closure& signal_callback,
       dbus::ObjectProxy::OnConnectedCallback on_connected_callback) = 0;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
 };
 
 }  // namespace chromium
@@ -469,7 +475,7 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
@@ -494,6 +500,8 @@
 class TestInterface2ProxyInterface {
  public:
   virtual ~TestInterface2ProxyInterface() = default;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
 };
 
 }  // namespace chromium
@@ -521,7 +529,7 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
@@ -582,6 +590,15 @@
 
   static const char* DataName() { return "Data"; }
   virtual const std::string& data() const = 0;
+  static const char* NameName() { return "Name"; }
+  virtual const std::string& name() const = 0;
+  virtual void set_name(const std::string& value,
+                        const base::Callback<void(bool)>& callback) = 0;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
+
+  virtual void SetPropertyChangedCallback(
+      const base::Callback<void(Itf1ProxyInterface*, const std::string&)>& callback) = 0;
 };
 
 }  // namespace chromium
@@ -601,9 +618,11 @@
                             "org.chromium.Itf1",
                             callback} {
       RegisterProperty(DataName(), &data);
+      RegisterProperty(NameName(), &name);
     }
 
     brillo::dbus_utils::Property<std::string> data;
+    brillo::dbus_utils::Property<std::string> name;
 
    private:
     DISALLOW_COPY_AND_ASSIGN(PropertySet);
@@ -638,14 +657,14 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
   dbus::ObjectProxy* GetObjectProxy() const { return dbus_object_proxy_; }
 
   void SetPropertyChangedCallback(
-      const base::Callback<void(Itf1Proxy*, const std::string&)>& callback) {
+      const base::Callback<void(Itf1ProxyInterface*, const std::string&)>& callback) override {
     on_property_changed_ = callback;
   }
 
@@ -656,6 +675,15 @@
     return property_set_->data.value();
   }
 
+  const std::string& name() const override {
+    return property_set_->name.value();
+  }
+
+  void set_name(const std::string& value,
+                const base::Callback<void(bool)>& callback) override {
+    property_set_->name.Set(value, callback);
+  }
+
  private:
   void OnPropertyChanged(const std::string& property_name) {
     if (!on_property_changed_.is_null())
@@ -666,7 +694,7 @@
   std::string service_name_;
   const dbus::ObjectPath object_path_{"/org/chromium/Test/Object"};
   PropertySet* property_set_;
-  base::Callback<void(Itf1Proxy*, const std::string&)> on_property_changed_;
+  base::Callback<void(Itf1ProxyInterface*, const std::string&)> on_property_changed_;
   dbus::ObjectProxy* dbus_object_proxy_;
 
   friend class org::chromium::ObjectManagerProxy;
@@ -683,6 +711,8 @@
 class Itf2ProxyInterface {
  public:
   virtual ~Itf2ProxyInterface() = default;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
 };
 
 }  // namespace chromium
@@ -726,7 +756,7 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
@@ -769,20 +799,20 @@
     return dbus_object_manager_;
   }
 
-  org::chromium::Itf1Proxy* GetItf1Proxy() {
+  org::chromium::Itf1ProxyInterface* GetItf1Proxy() {
     if (itf1_instances_.empty())
       return nullptr;
     return itf1_instances_.begin()->second.get();
   }
-  std::vector<org::chromium::Itf1Proxy*> GetItf1Instances() const {
-    std::vector<org::chromium::Itf1Proxy*> values;
+  std::vector<org::chromium::Itf1ProxyInterface*> GetItf1Instances() const {
+    std::vector<org::chromium::Itf1ProxyInterface*> values;
     values.reserve(itf1_instances_.size());
     for (const auto& pair : itf1_instances_)
       values.push_back(pair.second.get());
     return values;
   }
   void SetItf1AddedCallback(
-      const base::Callback<void(org::chromium::Itf1Proxy*)>& callback) {
+      const base::Callback<void(org::chromium::Itf1ProxyInterface*)>& callback) {
     on_itf1_added_ = callback;
   }
   void SetItf1RemovedCallback(
@@ -790,22 +820,22 @@
     on_itf1_removed_ = callback;
   }
 
-  org::chromium::Itf2Proxy* GetItf2Proxy(
+  org::chromium::Itf2ProxyInterface* GetItf2Proxy(
       const dbus::ObjectPath& object_path) {
     auto p = itf2_instances_.find(object_path);
     if (p != itf2_instances_.end())
       return p->second.get();
     return nullptr;
   }
-  std::vector<org::chromium::Itf2Proxy*> GetItf2Instances() const {
-    std::vector<org::chromium::Itf2Proxy*> values;
+  std::vector<org::chromium::Itf2ProxyInterface*> GetItf2Instances() const {
+    std::vector<org::chromium::Itf2ProxyInterface*> values;
     values.reserve(itf2_instances_.size());
     for (const auto& pair : itf2_instances_)
       values.push_back(pair.second.get());
     return values;
   }
   void SetItf2AddedCallback(
-      const base::Callback<void(org::chromium::Itf2Proxy*)>& callback) {
+      const base::Callback<void(org::chromium::Itf2ProxyInterface*)>& callback) {
     on_itf2_added_ = callback;
   }
   void SetItf2RemovedCallback(
@@ -907,11 +937,11 @@
   dbus::ObjectManager* dbus_object_manager_;
   std::map<dbus::ObjectPath,
            std::unique_ptr<org::chromium::Itf1Proxy>> itf1_instances_;
-  base::Callback<void(org::chromium::Itf1Proxy*)> on_itf1_added_;
+  base::Callback<void(org::chromium::Itf1ProxyInterface*)> on_itf1_added_;
   base::Callback<void(const dbus::ObjectPath&)> on_itf1_removed_;
   std::map<dbus::ObjectPath,
            std::unique_ptr<org::chromium::Itf2Proxy>> itf2_instances_;
-  base::Callback<void(org::chromium::Itf2Proxy*)> on_itf2_added_;
+  base::Callback<void(org::chromium::Itf2ProxyInterface*)> on_itf2_added_;
   base::Callback<void(const dbus::ObjectPath&)> on_itf2_removed_;
   base::WeakPtrFactory<ObjectManagerProxy> weak_ptr_factory_{this};
 
@@ -961,6 +991,8 @@
   virtual void RegisterCloserSignalHandler(
       const base::Closure& signal_callback,
       dbus::ObjectProxy::OnConnectedCallback on_connected_callback) = 0;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
 };
 
 }  // namespace chromium
@@ -1010,7 +1042,7 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
@@ -1035,6 +1067,8 @@
 class Itf2ProxyInterface {
  public:
   virtual ~Itf2ProxyInterface() = default;
+
+  virtual const dbus::ObjectPath& GetObjectPath() const = 0;
 };
 
 }  // namespace chromium
@@ -1076,7 +1110,7 @@
     bus_->RemoveObjectProxy(service_name_, object_path_, callback);
   }
 
-  const dbus::ObjectPath& GetObjectPath() const {
+  const dbus::ObjectPath& GetObjectPath() const override {
     return object_path_;
   }
 
@@ -1117,20 +1151,20 @@
     return dbus_object_manager_;
   }
 
-  org::chromium::Itf1Proxy* GetItf1Proxy() {
+  org::chromium::Itf1ProxyInterface* GetItf1Proxy() {
     if (itf1_instances_.empty())
       return nullptr;
     return itf1_instances_.begin()->second.get();
   }
-  std::vector<org::chromium::Itf1Proxy*> GetItf1Instances() const {
-    std::vector<org::chromium::Itf1Proxy*> values;
+  std::vector<org::chromium::Itf1ProxyInterface*> GetItf1Instances() const {
+    std::vector<org::chromium::Itf1ProxyInterface*> values;
     values.reserve(itf1_instances_.size());
     for (const auto& pair : itf1_instances_)
       values.push_back(pair.second.get());
     return values;
   }
   void SetItf1AddedCallback(
-      const base::Callback<void(org::chromium::Itf1Proxy*)>& callback) {
+      const base::Callback<void(org::chromium::Itf1ProxyInterface*)>& callback) {
     on_itf1_added_ = callback;
   }
   void SetItf1RemovedCallback(
@@ -1138,22 +1172,22 @@
     on_itf1_removed_ = callback;
   }
 
-  org::chromium::Itf2Proxy* GetItf2Proxy(
+  org::chromium::Itf2ProxyInterface* GetItf2Proxy(
       const dbus::ObjectPath& object_path) {
     auto p = itf2_instances_.find(object_path);
     if (p != itf2_instances_.end())
       return p->second.get();
     return nullptr;
   }
-  std::vector<org::chromium::Itf2Proxy*> GetItf2Instances() const {
-    std::vector<org::chromium::Itf2Proxy*> values;
+  std::vector<org::chromium::Itf2ProxyInterface*> GetItf2Instances() const {
+    std::vector<org::chromium::Itf2ProxyInterface*> values;
     values.reserve(itf2_instances_.size());
     for (const auto& pair : itf2_instances_)
       values.push_back(pair.second.get());
     return values;
   }
   void SetItf2AddedCallback(
-      const base::Callback<void(org::chromium::Itf2Proxy*)>& callback) {
+      const base::Callback<void(org::chromium::Itf2ProxyInterface*)>& callback) {
     on_itf2_added_ = callback;
   }
   void SetItf2RemovedCallback(
@@ -1244,11 +1278,11 @@
   dbus::ObjectManager* dbus_object_manager_;
   std::map<dbus::ObjectPath,
            std::unique_ptr<org::chromium::Itf1Proxy>> itf1_instances_;
-  base::Callback<void(org::chromium::Itf1Proxy*)> on_itf1_added_;
+  base::Callback<void(org::chromium::Itf1ProxyInterface*)> on_itf1_added_;
   base::Callback<void(const dbus::ObjectPath&)> on_itf1_removed_;
   std::map<dbus::ObjectPath,
            std::unique_ptr<org::chromium::Itf2Proxy>> itf2_instances_;
-  base::Callback<void(org::chromium::Itf2Proxy*)> on_itf2_added_;
+  base::Callback<void(org::chromium::Itf2ProxyInterface*)> on_itf2_added_;
   base::Callback<void(const dbus::ObjectPath&)> on_itf2_removed_;
   base::WeakPtrFactory<ObjectManagerProxy> weak_ptr_factory_{this};
 
@@ -1348,6 +1382,7 @@
   interface.path = "/org/chromium/Test/Object";
   interface.signals.emplace_back("Closer");
   interface.properties.emplace_back("Data", "s", "read");
+  interface.properties.emplace_back("Name", "s", "readwrite");
   Interface interface2;
   interface2.name = "org.chromium.Itf2";
   vector<Interface> interfaces{interface, interface2};