OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/signin/easy_unlock_notification_controller.h" |
| 6 |
| 7 #include "base/memory/ptr_util.h" |
| 8 #include "build/build_config.h" |
| 9 |
| 10 #if defined(OS_CHROMEOS) |
| 11 #include "chrome/browser/signin/easy_unlock_notification_controller_chromeos.h" |
| 12 #include "ui/message_center/message_center.h" |
| 13 #endif |
| 14 |
| 15 namespace { |
| 16 |
| 17 // Stub implementation of EasyUnlockNotificationController for non-ChromeOS |
| 18 // platforms. |
| 19 class EasyUnlockNotificationControllerStub |
| 20 : public EasyUnlockNotificationController { |
| 21 public: |
| 22 EasyUnlockNotificationControllerStub() {} |
| 23 ~EasyUnlockNotificationControllerStub() override {} |
| 24 |
| 25 // EasyUnlockNotificationController: |
| 26 void ShowChromebookAddedNotification() override {} |
| 27 void ShowPairingChangeNotification() override {} |
| 28 void ShowPairingChangeAppliedNotification( |
| 29 const std::string& phone_name) override {} |
| 30 void ShowPromotionNotification() override {} |
| 31 |
| 32 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(EasyUnlockNotificationControllerStub); |
| 34 }; |
| 35 |
| 36 } // namespace |
| 37 |
| 38 std::unique_ptr<EasyUnlockNotificationController> |
| 39 EasyUnlockNotificationController::Create(Profile* profile) { |
| 40 #if defined(OS_CHROMEOS) |
| 41 return base::MakeUnique<EasyUnlockNotificationControllerChromeOS>( |
| 42 profile, message_center::MessageCenter::Get()); |
| 43 #else |
| 44 return base::MakeUnique<EasyUnlockNotificationControllerStub>(); |
| 45 #endif |
| 46 } |
OLD | NEW |