Revert "UI Notification for Gnubby U2F UI."

This reverts commit d95be619b5a98a02570063dfbb1c9c78ff54c2d4.

Reason for revert: New test fails on cros test bots, rel and dbg:
https://ci.chromium.org/p/chromium/builders/ci/linux-chromeos-dbg/12442
https://ci.chromium.org/p/chromium/builders/ci/linux-chromeos-rel/24516

Original change's description:
> UI Notification for Gnubby U2F UI.
> 
> Bug: 757077
> Change-Id: I54305669b9fbbcb9191c814790ebe29a7dff0d62
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1404060
> Commit-Queue: Yulun Wu <yulunwu@chromium.org>
> Reviewed-by: Alexander Alekseev <alemate@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#661147}

TBR=alemate@chromium.org,apronin@chromium.org,yulunwu@chromium.org

Change-Id: Ibb4a66731dd358844c271117cf7a37565cc3643b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 757077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1619063
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661199}
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp
index 133c61a..9be53a6 100644
--- a/chrome/app/chromeos_strings.grdp
+++ b/chrome/app/chromeos_strings.grdp
@@ -3947,11 +3947,4 @@
   <message name="IDS_ADD_SUPERVISION_PAGE_TITLE" desc="Title for the Chrome OS Add Supervision screen.">
     Add Supervision
   </message>
-    <!-- Strings for gnubby U2FD authentication UI -->
-  <message name="IDS_GNUBBY_NOTIFICATION_TITLE" desc="Title for notification informing user to press power button for gnubby U2FD.">
-    A security key is being requested
-  </message>
-  <message name="IDS_GNUBBY_NOTIFICATION_MESSAGE" desc="Text for notifications informing user that Chrome is requestor for U2FD.">
-    Please tap your power button
-  </message>
 </grit-part>
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index ca0ed677..169afad 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -1997,8 +1997,6 @@
     "ui/echo_dialog_listener.h",
     "ui/echo_dialog_view.cc",
     "ui/echo_dialog_view.h",
-    "ui/gnubby_notification.cc",
-    "ui/gnubby_notification.h",
     "ui/idle_app_name_notification_view.cc",
     "ui/idle_app_name_notification_view.h",
     "ui/kiosk_external_update_notification.cc",
@@ -2612,7 +2610,6 @@
     "system_logs/single_log_file_log_source_unittest.cc",
     "tether/tether_service_unittest.cc",
     "tpm_firmware_update_unittest.cc",
-    "ui/gnubby_notification_unittest.cc",
     "ui/idle_app_name_notification_view_unittest.cc",
     "ui/low_disk_notification_unittest.cc",
     "wilco_dtc_supportd/testing_wilco_dtc_supportd_bridge_wrapper.cc",
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
index 3e22a64..9cc6e01 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -104,7 +104,6 @@
 #include "chrome/browser/chromeos/startup_settings_cache.h"
 #include "chrome/browser/chromeos/system/input_device_settings.h"
 #include "chrome/browser/chromeos/system/user_removal_manager.h"
-#include "chrome/browser/chromeos/ui/gnubby_notification.h"
 #include "chrome/browser/chromeos/ui/low_disk_notification.h"
 #include "chrome/browser/chromeos/usb/cros_usb_detector.h"
 #include "chrome/browser/chromeos/wilco_dtc_supportd/wilco_dtc_supportd_manager.h"
@@ -969,8 +968,6 @@
   if (!user_manager::UserManager::Get()->IsLoggedInAsGuest())
     low_disk_notification_ = std::make_unique<LowDiskNotification>();
 
-  gnubby_notification_ = std::make_unique<GnubbyNotification>();
-
   demo_mode_resources_remover_ = DemoModeResourcesRemover::CreateIfNeeded(
       g_browser_process->local_state());
   // Start measuring crosvm processes resource usage.
@@ -1118,7 +1115,6 @@
   dark_resume_controller_.reset();
   lock_to_single_user_manager_.reset();
   wilco_dtc_supportd_manager_.reset();
-  gnubby_notification_.reset();
 
   // Detach D-Bus clients before DBusThreadManager is shut down.
   idle_action_warning_observer_.reset();
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.h b/chrome/browser/chromeos/chrome_browser_main_chromeos.h
index 33f42fb..c24b1a4 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.h
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.h
@@ -55,7 +55,6 @@
 class ShutdownPolicyForwarder;
 class WakeOnWifiManager;
 class WilcoDtcSupportdManager;
-class GnubbyNotification;
 
 namespace default_app_order {
 class ExternalLoader;
@@ -174,8 +173,6 @@
   std::unique_ptr<policy::LockToSingleUserManager> lock_to_single_user_manager_;
   std::unique_ptr<WilcoDtcSupportdManager> wilco_dtc_supportd_manager_;
 
-  std::unique_ptr<GnubbyNotification> gnubby_notification_;
-
   DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsChromeos);
 };
 
diff --git a/chrome/browser/chromeos/ui/gnubby_notification.cc b/chrome/browser/chromeos/ui/gnubby_notification.cc
deleted file mode 100644
index eb06a80d..0000000
--- a/chrome/browser/chromeos/ui/gnubby_notification.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/ui/gnubby_notification.h"
-
-#include "ash/public/cpp/notification_utils.h"
-#include "base/location.h"
-#include "base/strings/string16.h"
-#include "base/task/post_task.h"
-#include "chrome/browser/notifications/notification_display_service.h"
-#include "chrome/browser/notifications/system_notification_helper.h"
-#include "chrome/grit/generated_resources.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/message_center/public/cpp/notification.h"
-#include "ui/message_center/public/cpp/notification_delegate.h"
-
-namespace {
-constexpr base::TimeDelta kNotificationTimeout =
-    base::TimeDelta::FromSeconds(2);
-}  // namespace
-
-namespace chromeos {
-
-GnubbyNotification::GnubbyNotification()
-    : update_dismiss_notification_timer_(new base::OneShotTimer()),
-      weak_ptr_factory_(this) {
-  DCHECK(DBusThreadManager::Get()->GetGnubbyClient());
-  DBusThreadManager::Get()->GetGnubbyClient()->AddObserver(this);
-}
-GnubbyNotification::~GnubbyNotification() {
-  DCHECK(DBusThreadManager::Get()->GetGnubbyClient());
-  DBusThreadManager::Get()->GetGnubbyClient()->RemoveObserver(this);
-}
-
-void GnubbyNotification::PromptUserAuth() {
-  ShowNotification();
-}
-
-void GnubbyNotification::CreateNotification() {
-  const base::string16 title =
-      l10n_util::GetStringUTF16(IDS_GNUBBY_NOTIFICATION_TITLE);
-  const base::string16 message =
-      l10n_util::GetStringUTF16(IDS_GNUBBY_NOTIFICATION_MESSAGE);
-  const message_center::SystemNotificationWarningLevel colorType =
-      message_center::SystemNotificationWarningLevel::NORMAL;
-
-  GnubbyNotification::notification_prompt_ = ash::CreateSystemNotification(
-      message_center::NOTIFICATION_TYPE_SIMPLE,
-      GnubbyNotification::kNotificationID, title, message, base::string16(),
-      GURL(), message_center::NotifierId(),
-      message_center::RichNotificationData(),
-      new message_center::HandleNotificationClickDelegate(
-          base::BindRepeating(&GnubbyNotification::DismissNotification,
-                              weak_ptr_factory_.GetWeakPtr())),
-      gfx::VectorIcon(), colorType);
-}
-
-void GnubbyNotification::ShowNotification() {
-  GnubbyNotification::update_dismiss_notification_timer_->Stop();
-
-  if (GnubbyNotification::notificationActive == false) {
-    GnubbyNotification::notification_prompt_.reset();
-    CreateNotification();
-  }
-  SystemNotificationHelper::GetInstance()->Display(
-      *GnubbyNotification::notification_prompt_);
-  GnubbyNotification::update_dismiss_notification_timer_->Start(
-      FROM_HERE, kNotificationTimeout,
-      base::BindRepeating(&GnubbyNotification::DismissNotification,
-                          base::Unretained(this)));
-}
-
-void GnubbyNotification::DismissNotification() {
-  GnubbyNotification::notificationActive = false;
-  SystemNotificationHelper::GetInstance()->Close(
-      GnubbyNotification::kNotificationID);
-}
-
-}  // namespace chromeos
diff --git a/chrome/browser/chromeos/ui/gnubby_notification.h b/chrome/browser/chromeos/ui/gnubby_notification.h
deleted file mode 100644
index 9c226aa..0000000
--- a/chrome/browser/chromeos/ui/gnubby_notification.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_UI_GNUBBY_NOTIFICATION_H_
-#define CHROME_BROWSER_CHROMEOS_UI_GNUBBY_NOTIFICATION_H_
-
-#include "base/memory/weak_ptr.h"
-#include "base/timer/timer.h"
-#include "chrome/browser/notifications/notification_display_service.h"
-#include "chrome/browser/notifications/system_notification_helper.h"
-#include "chromeos/dbus/gnubby_client.h"
-
-namespace message_center {
-class Notification;
-}
-
-namespace chromeos {
-// GnubbyNotification manages the notification informing the user of gnubby
-// U2FD Authentication.  It is responsible for both creating, showing, and
-// closing the notification.
-
-class GnubbyNotification : public GnubbyClient::Observer {
- public:
-  GnubbyNotification();
-
-  // Resets GnubbyClient NotificationHandler.
-  ~GnubbyNotification() override;
-
-  // Called when dbus client receives a U2FD Auth request
-  // Displays graphic prompting user to press power button
-  // Dismisses graphic after timeout
-  void PromptUserAuth() override;
-
-  void CreateNotification();
-  void ShowNotification();
-  void DismissNotification();
-
- private:
-  std::unique_ptr<message_center::Notification> notification_prompt_;
-  std::unique_ptr<base::OneShotTimer> update_dismiss_notification_timer_;
-  const std::string kNotificationID = "gnubby_notification";
-  bool notificationActive;
-
-  base::WeakPtrFactory<GnubbyNotification> weak_ptr_factory_{this};
-
-  DISALLOW_COPY_AND_ASSIGN(GnubbyNotification);
-};
-
-}  // namespace chromeos
-
-#endif  // CHROME_BROWSER_CHROMEOS_UI_GNUBBY_NOTIFICATION_H_
diff --git a/chrome/browser/chromeos/ui/gnubby_notification_unittest.cc b/chrome/browser/chromeos/ui/gnubby_notification_unittest.cc
deleted file mode 100644
index 5569a1c..0000000
--- a/chrome/browser/chromeos/ui/gnubby_notification_unittest.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/ui/gnubby_notification.h"
-#include "chrome/browser/notifications/notification_display_service_tester.h"
-#include "chrome/grit/generated_resources.h"
-#include "chrome/test/base/browser_with_test_window_test.h"
-#include "chrome/test/base/testing_browser_process.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/fake_gnubby_client.h"
-#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
-
-namespace chromeos {
-
-class GnubbyNotificationTest : public BrowserWithTestWindowTest {
- public:
-  GnubbyNotificationTest() {}
-  ~GnubbyNotificationTest() override {}
-
-  void SetUp() override {
-    BrowserWithTestWindowTest::SetUp();
-    DBusThreadManager::GetSetterForTesting()->SetGnubbyClient(
-        std::unique_ptr<GnubbyClient>(new FakeGnubbyClient));
-
-    TestingBrowserProcess::GetGlobal()->SetSystemNotificationHelper(
-        std::make_unique<SystemNotificationHelper>());
-    tester_ = std::make_unique<NotificationDisplayServiceTester>(
-        nullptr /* profile */);
-    tester_->SetNotificationAddedClosure(base::BindRepeating(
-        &GnubbyNotificationTest::OnNotificationAdded, base::Unretained(this)));
-    gnubby_notification_.reset(new GnubbyNotification());
-    notification_count_ = 0;
-  }
-
-  base::Optional<message_center::Notification> GetNotification() {
-    return tester_->GetNotification("gnubby_notification");
-  }
-
-  void TearDown() override {
-    gnubby_notification_.reset();
-    tester_.reset();
-    DBusThreadManager::GetSetterForTesting()->SetGnubbyClient(nullptr);
-    BrowserWithTestWindowTest::TearDown();
-  }
-
-  void OnNotificationAdded() { notification_count_++; }
-
- protected:
-  std::unique_ptr<NotificationDisplayServiceTester> tester_;
-  std::unique_ptr<GnubbyNotification> gnubby_notification_;
-  int notification_count_ = 0;
-};
-
-TEST_F(GnubbyNotificationTest, SingleNotificationsTest) {
-  base::string16 expected_title =
-      l10n_util::GetStringUTF16(IDS_GNUBBY_NOTIFICATION_TITLE);
-  gnubby_notification_->ShowNotification();
-  auto notification = GetNotification();
-  ASSERT_TRUE(notification);
-  EXPECT_EQ(expected_title, notification->title());
-  EXPECT_EQ(1, notification_count_);
-}
-
-TEST_F(GnubbyNotificationTest, TwoNotificationsTest) {
-  base::string16 expected_title =
-      l10n_util::GetStringUTF16(IDS_GNUBBY_NOTIFICATION_TITLE);
-  gnubby_notification_->ShowNotification();
-  gnubby_notification_->DismissNotification();
-  gnubby_notification_->ShowNotification();
-  auto notification = GetNotification();
-  ASSERT_TRUE(notification);
-  EXPECT_EQ(expected_title, notification->title());
-  EXPECT_EQ(2, notification_count_);
-}
-
-}  // namespace chromeos
diff --git a/chromeos/dbus/BUILD.gn b/chromeos/dbus/BUILD.gn
index b08d1bd..5ed5920 100644
--- a/chromeos/dbus/BUILD.gn
+++ b/chromeos/dbus/BUILD.gn
@@ -90,8 +90,6 @@
     "fake_debug_daemon_client.h",
     "fake_easy_unlock_client.cc",
     "fake_easy_unlock_client.h",
-    "fake_gnubby_client.cc",
-    "fake_gnubby_client.h",
     "fake_image_burner_client.cc",
     "fake_image_burner_client.h",
     "fake_image_loader_client.cc",
@@ -114,8 +112,6 @@
     "fake_vm_plugin_dispatcher_client.h",
     "fake_wilco_dtc_supportd_client.cc",
     "fake_wilco_dtc_supportd_client.h",
-    "gnubby_client.cc",
-    "gnubby_client.h",
     "image_burner_client.cc",
     "image_burner_client.h",
     "image_loader_client.cc",
@@ -228,7 +224,6 @@
     "cryptohome/fake_cryptohome_client_unittest.cc",
     "dbus_thread_manager_unittest.cc",
     "fake_easy_unlock_client_unittest.cc",
-    "fake_gnubby_client_unittest.cc",
     "native_timer_unittest.cc",
     "oobe_configuration_client_unittest.cc",
     "pipe_reader_unittest.cc",
diff --git a/chromeos/dbus/dbus_clients_browser.cc b/chromeos/dbus/dbus_clients_browser.cc
index acb9253..3112330 100644
--- a/chromeos/dbus/dbus_clients_browser.cc
+++ b/chromeos/dbus/dbus_clients_browser.cc
@@ -27,7 +27,6 @@
 #include "chromeos/dbus/fake_cros_disks_client.h"
 #include "chromeos/dbus/fake_debug_daemon_client.h"
 #include "chromeos/dbus/fake_easy_unlock_client.h"
-#include "chromeos/dbus/fake_gnubby_client.h"
 #include "chromeos/dbus/fake_image_burner_client.h"
 #include "chromeos/dbus/fake_image_loader_client.h"
 #include "chromeos/dbus/fake_lorgnette_manager_client.h"
@@ -38,7 +37,6 @@
 #include "chromeos/dbus/fake_virtual_file_provider_client.h"
 #include "chromeos/dbus/fake_vm_plugin_dispatcher_client.h"
 #include "chromeos/dbus/fake_wilco_dtc_supportd_client.h"
-#include "chromeos/dbus/gnubby_client.h"
 #include "chromeos/dbus/image_burner_client.h"
 #include "chromeos/dbus/image_loader_client.h"
 #include "chromeos/dbus/lorgnette_manager_client.h"
@@ -87,7 +85,6 @@
   debug_daemon_client_ =
       CREATE_DBUS_CLIENT(DebugDaemonClient, use_real_clients);
   easy_unlock_client_ = CREATE_DBUS_CLIENT(EasyUnlockClient, use_real_clients);
-  gnubby_client_ = CREATE_DBUS_CLIENT(GnubbyClient, use_real_clients);
   image_burner_client_ =
       CREATE_DBUS_CLIENT(ImageBurnerClient, use_real_clients);
   image_loader_client_ =
@@ -125,7 +122,6 @@
   cros_disks_client_->Init(system_bus);
   debug_daemon_client_->Init(system_bus);
   easy_unlock_client_->Init(system_bus);
-  gnubby_client_->Init(system_bus);
   image_burner_client_->Init(system_bus);
   image_loader_client_->Init(system_bus);
   lorgnette_manager_client_->Init(system_bus);
diff --git a/chromeos/dbus/dbus_clients_browser.h b/chromeos/dbus/dbus_clients_browser.h
index d0969946..b4b78806 100644
--- a/chromeos/dbus/dbus_clients_browser.h
+++ b/chromeos/dbus/dbus_clients_browser.h
@@ -26,7 +26,6 @@
 class CrosDisksClient;
 class DebugDaemonClient;
 class EasyUnlockClient;
-class GnubbyClient;
 class ImageBurnerClient;
 class ImageLoaderClient;
 class LorgnetteManagerClient;
@@ -64,7 +63,6 @@
   std::unique_ptr<CrosDisksClient> cros_disks_client_;
   std::unique_ptr<DebugDaemonClient> debug_daemon_client_;
   std::unique_ptr<EasyUnlockClient> easy_unlock_client_;
-  std::unique_ptr<GnubbyClient> gnubby_client_;
   std::unique_ptr<ImageBurnerClient> image_burner_client_;
   std::unique_ptr<ImageLoaderClient> image_loader_client_;
   std::unique_ptr<LorgnetteManagerClient> lorgnette_manager_client_;
diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc
index 65ba25d..c5b5c43 100644
--- a/chromeos/dbus/dbus_thread_manager.cc
+++ b/chromeos/dbus/dbus_thread_manager.cc
@@ -23,7 +23,6 @@
 #include "chromeos/dbus/dbus_clients_browser.h"
 #include "chromeos/dbus/debug_daemon_client.h"
 #include "chromeos/dbus/easy_unlock_client.h"
-#include "chromeos/dbus/gnubby_client.h"
 #include "chromeos/dbus/image_burner_client.h"
 #include "chromeos/dbus/image_loader_client.h"
 #include "chromeos/dbus/lorgnette_manager_client.h"
@@ -153,10 +152,6 @@
                           : nullptr;
 }
 
-GnubbyClient* DBusThreadManager::GetGnubbyClient() {
-  return clients_browser_ ? clients_browser_->gnubby_client_.get() : nullptr;
-}
-
 ShillDeviceClient* DBusThreadManager::GetShillDeviceClient() {
   return ShillDeviceClient::Get();
 }
@@ -362,12 +357,6 @@
       std::move(client);
 }
 
-void DBusThreadManagerSetter::SetGnubbyClient(
-    std::unique_ptr<GnubbyClient> client) {
-  DBusThreadManager::Get()->clients_browser_->gnubby_client_ =
-      std::move(client);
-}
-
 void DBusThreadManagerSetter::SetRuntimeProbeClient(
     std::unique_ptr<RuntimeProbeClient> client) {
   DBusThreadManager::Get()->clients_browser_->runtime_probe_client_ =
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h
index f3e508a..10a7517 100644
--- a/chromeos/dbus/dbus_thread_manager.h
+++ b/chromeos/dbus/dbus_thread_manager.h
@@ -36,7 +36,6 @@
 class DBusThreadManagerSetter;
 class DebugDaemonClient;
 class EasyUnlockClient;
-class GnubbyClient;
 class ImageBurnerClient;
 class ImageLoaderClient;
 class LorgnetteManagerClient;
@@ -125,7 +124,6 @@
   CrosDisksClient* GetCrosDisksClient();
   DebugDaemonClient* GetDebugDaemonClient();
   EasyUnlockClient* GetEasyUnlockClient();
-  GnubbyClient* GetGnubbyClient();
   ImageBurnerClient* GetImageBurnerClient();
   ImageLoaderClient* GetImageLoaderClient();
   LorgnetteManagerClient* GetLorgnetteManagerClient();
@@ -182,7 +180,6 @@
   void SetConciergeClient(std::unique_ptr<ConciergeClient> client);
   void SetCrosDisksClient(std::unique_ptr<CrosDisksClient> client);
   void SetDebugDaemonClient(std::unique_ptr<DebugDaemonClient> client);
-  void SetGnubbyClient(std::unique_ptr<GnubbyClient> client);
   void SetImageBurnerClient(std::unique_ptr<ImageBurnerClient> client);
   void SetImageLoaderClient(std::unique_ptr<ImageLoaderClient> client);
   void SetSeneschalClient(std::unique_ptr<SeneschalClient> client);
diff --git a/chromeos/dbus/fake_gnubby_client.cc b/chromeos/dbus/fake_gnubby_client.cc
deleted file mode 100644
index c3a1698..0000000
--- a/chromeos/dbus/fake_gnubby_client.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chromeos/dbus/fake_gnubby_client.h"
-
-namespace chromeos {
-
-FakeGnubbyClient::FakeGnubbyClient() : weak_ptr_factory_(this) {}
-
-FakeGnubbyClient::~FakeGnubbyClient() = default;
-
-void FakeGnubbyClient::Init(dbus::Bus* bus) {}
-
-void FakeGnubbyClient::AddObserver(Observer* observer) {
-  observer_list_.AddObserver(observer);
-}
-
-void FakeGnubbyClient::RemoveObserver(Observer* observer) {
-  observer_list_.RemoveObserver(observer);
-}
-
-void FakeGnubbyClient::SignalPromptUserAuth() {
-  calls_++;
-  for (auto& observer : observer_list_)
-    observer.PromptUserAuth();
-}
-
-}  // namespace chromeos
diff --git a/chromeos/dbus/fake_gnubby_client.h b/chromeos/dbus/fake_gnubby_client.h
deleted file mode 100644
index 7df051e..0000000
--- a/chromeos/dbus/fake_gnubby_client.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROMEOS_DBUS_FAKE_GNUBBY_CLIENT_H_
-#define CHROMEOS_DBUS_FAKE_GNUBBY_CLIENT_H_
-
-#include "base/observer_list.h"
-#include "chromeos/dbus/gnubby_client.h"
-
-namespace chromeos {
-
-// A fake implementation of GnubbyClient used for tests.
-class COMPONENT_EXPORT(CHROMEOS_DBUS) FakeGnubbyClient : public GnubbyClient {
- public:
-  FakeGnubbyClient();
-  ~FakeGnubbyClient() override;
-
-  // GnubbyClient overrides
-  void Init(dbus::Bus* bus) override;
-  void AddObserver(Observer* observer) override;
-  void RemoveObserver(Observer* observer) override;
-  void SignalPromptUserAuth();
-  int calls() { return calls_; }
-
- private:
-  int calls_ = 0;
-
-  base::ObserverList<Observer>::Unchecked observer_list_;
-
-  base::WeakPtrFactory<FakeGnubbyClient> weak_ptr_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(FakeGnubbyClient);
-};
-
-}  // namespace chromeos
-
-#endif  // CHROMEOS_DBUS_FAKE_GNUBBY_CLIENT_H_
diff --git a/chromeos/dbus/fake_gnubby_client_unittest.cc b/chromeos/dbus/fake_gnubby_client_unittest.cc
deleted file mode 100644
index 3586fdf..0000000
--- a/chromeos/dbus/fake_gnubby_client_unittest.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chromeos/dbus/fake_gnubby_client.h"
-
-#include "base/scoped_observer.h"
-#include "base/test/scoped_task_environment.h"
-#include "chromeos/dbus/attestation/attestation.pb.h"
-#include "chromeos/dbus/gnubby_client.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace chromeos {
-
-namespace {
-
-class TestObserver : public GnubbyClient::Observer {
- public:
-  TestObserver() = default;
-
-  void PromptUserAuth() override { calls_++; }
-  int calls() { return calls_; }
-
- private:
-  int calls_ = 0;
-  DISALLOW_COPY_AND_ASSIGN(TestObserver);
-};
-
-}  // namespace
-
-class FakeGnubbyClientTest : public testing::Test {
- public:
-  FakeGnubbyClientTest() = default;
-
- protected:
-  base::test::ScopedTaskEnvironment scoped_task_environment_;
-  FakeGnubbyClient fake_gnubby_client_;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(FakeGnubbyClientTest);
-};
-
-TEST_F(FakeGnubbyClientTest, NotificationSent) {
-  TestObserver observer;
-  ScopedObserver<GnubbyClient, TestObserver> scoped_observer(&observer);
-  scoped_observer.Add(&fake_gnubby_client_);
-
-  EXPECT_EQ(fake_gnubby_client_.calls(), 0);
-  EXPECT_EQ(observer.calls(), 0);
-  fake_gnubby_client_.SignalPromptUserAuth();
-  base::RunLoop().RunUntilIdle();
-  EXPECT_EQ(fake_gnubby_client_.calls(), 1);
-  EXPECT_EQ(observer.calls(), 1);
-}
-
-}  // namespace chromeos
diff --git a/chromeos/dbus/gnubby_client.cc b/chromeos/dbus/gnubby_client.cc
deleted file mode 100644
index 1ff11b6..0000000
--- a/chromeos/dbus/gnubby_client.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chromeos/dbus/gnubby_client.h"
-
-#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
-#include "base/timer/timer.h"
-#include "dbus/bus.h"
-#include "dbus/message.h"
-#include "dbus/object_path.h"
-#include "dbus/object_proxy.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-
-namespace chromeos {
-
-namespace {
-
-class GnubbyClientImpl : public GnubbyClient {
- public:
-  GnubbyClientImpl() : weak_ptr_factory_(this) {}
-
-  // GnubbyClient override.
-  void AddObserver(Observer* observer) override {
-    observer_list_.AddObserver(observer);
-  }
-
-  // GnubbyClient override.
-  void RemoveObserver(Observer* observer) override {
-    observer_list_.RemoveObserver(observer);
-  }
-
-  void PromptUserAuth(dbus::Signal* signal) {
-    for (auto& observer : observer_list_)
-      observer.PromptUserAuth();
-  }
-
- protected:
-  void Init(dbus::Bus* bus) override {
-    dbus::ObjectProxy* proxy_ = bus->GetObjectProxy(
-        u2f::kU2FServiceName, dbus::ObjectPath(u2f::kU2FServicePath));
-
-    proxy_->ConnectToSignal(
-        u2f::kU2FInterface, u2f::kU2FUserNotificationSignal,
-        base::BindRepeating(&GnubbyClientImpl::PromptUserAuth,
-                            weak_ptr_factory_.GetWeakPtr()),
-        base::BindOnce(&GnubbyClientImpl::OnSignalConnected,
-                       weak_ptr_factory_.GetWeakPtr()));
-  }
-
- private:
-  // Handles the result of signal connection setup.
-  void OnSignalConnected(const std::string& interface,
-                         const std::string& signal,
-                         bool succeeded) {
-    LOG_IF(ERROR, !succeeded)
-        << "Connect to " << interface << " " << signal << " failed.";
-  }
-
-  base::ObserverList<Observer>::Unchecked observer_list_;
-
-  base::WeakPtrFactory<GnubbyClientImpl> weak_ptr_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(GnubbyClientImpl);
-};
-
-}  // namespace
-
-GnubbyClient::GnubbyClient() = default;
-
-GnubbyClient::~GnubbyClient() = default;
-
-// static
-std::unique_ptr<GnubbyClient> GnubbyClient::Create() {
-  return std::make_unique<GnubbyClientImpl>();
-}
-}  // namespace chromeos
diff --git a/chromeos/dbus/gnubby_client.h b/chromeos/dbus/gnubby_client.h
deleted file mode 100644
index fb632e3..0000000
--- a/chromeos/dbus/gnubby_client.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROMEOS_DBUS_GNUBBY_CLIENT_H_
-#define CHROMEOS_DBUS_GNUBBY_CLIENT_H_
-
-#include <memory>
-
-#include "base/component_export.h"
-#include "chromeos/dbus/dbus_client.h"
-#include "dbus/bus.h"
-#include "dbus/message.h"
-#include "third_party/cros_system_api/dbus/u2f/dbus-constants.h"
-
-namespace chromeos {
-// GnubbyClient is used to communicate with the Gnubby service.
-class COMPONENT_EXPORT(CHROMEOS_DBUS) GnubbyClient : public DBusClient {
- public:
-  // Interface for observing changes in Gnubby Client
-  class Observer {
-   public:
-    // Called when U2F service is requested
-    virtual void PromptUserAuth() {}
-
-   protected:
-    virtual ~Observer() = default;
-  };
-
-  // Create should be called instead of constructor.
-  GnubbyClient();
-  ~GnubbyClient() override;
-
-  // Factory function, creates a new instance and returns ownership.
-  // For normal usage, access the singleton via DBusThreadManager::Get().
-  static std::unique_ptr<GnubbyClient> Create();
-
-  // Adds an observer.
-  virtual void AddObserver(Observer* observer) = 0;
-
-  // Removes an observer if added.
-  virtual void RemoveObserver(Observer* observer) = 0;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(GnubbyClient);
-};
-}  // namespace chromeos
-
-#endif  // CHROMEOS_DBUS_GNUBBY_CLIENT_H_