[go: nahoru, domu]

Remove several overrides of Views::GetClassName

Metadata macros already create a GetClassName function. For classes
that already implement metadata GetClassName is not needed especially
since most of the time the returned classname is the same as the macro
version. Remove these overrides. For classes that do not have
metadata implemented, implement metadata and then remove overrides.

No class name changes for the files in this CL

Bug: 324596267
Change-Id: Ib6b55da35b565e15f58113c42397c3a5e4af749f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5282705
Reviewed-by: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: Angela Xiao <angelaxiao@chromium.org>
Commit-Queue: Elaine Chien <elainechien@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1260107}
diff --git a/ash/system/phonehub/app_stream_launcher_view.h b/ash/system/phonehub/app_stream_launcher_view.h
index 376e1aaa..165a145f 100644
--- a/ash/system/phonehub/app_stream_launcher_view.h
+++ b/ash/system/phonehub/app_stream_launcher_view.h
@@ -16,6 +16,7 @@
 #include "chromeos/ash/components/phonehub/notification.h"
 #include "chromeos/ash/components/phonehub/recent_app_click_observer.h"
 #include "chromeos/ash/components/phonehub/recent_apps_interaction_handler.h"
+#include "ui/base/metadata/metadata_header_macros.h"
 #include "ui/gfx/vector_icon_types.h"
 #include "ui/views/controls/button/button.h"
 #include "ui/views/view.h"
@@ -34,6 +35,7 @@
 class ASH_EXPORT AppStreamLauncherView
     : public PhoneHubContentView,
       public phonehub::AppStreamLauncherDataModel::Observer {
+  METADATA_HEADER(AppStreamLauncherView, PhoneHubContentView)
  public:
   explicit AppStreamLauncherView(phonehub::PhoneHubManager* phone_hub_manager);
   ~AppStreamLauncherView() override;
@@ -41,7 +43,6 @@
   // views::View:
   void ChildPreferredSizeChanged(View* child) override;
   void ChildVisibilityChanged(View* child) override;
-  const char* GetClassName() const override;
 
   // PhoneHubContentView:
   phone_hub_metrics::Screen GetScreenForMetrics() const override;