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 | |
9 #if defined(OS_CHROMEOS) | |
10 #include "chrome/browser/signin/easy_unlock_notification_controller_chromeos.h" | |
11 #include "ui/message_center/message_center.h" | |
12 #endif | |
13 | |
14 namespace { | |
15 | |
16 // Stub implementation of EasyUnlockNotificationController for non-ChromeOS | |
17 // platforms. | |
18 class EasyUnlockNotificationControllerStub | |
19 : public EasyUnlockNotificationController { | |
20 public: | |
21 EasyUnlockNotificationControllerStub() {} | |
22 ~EasyUnlockNotificationControllerStub() override {} | |
23 | |
24 // EasyUnlockNotificationController: | |
25 void ShowChromebookAddedNotification() override {} | |
26 void ShowPairingChangeNotification() override {} | |
27 void ShowPairingChangeAppliedNotification( | |
28 const std::string& phone_name) override {} | |
29 | |
30 private: | |
31 DISALLOW_COPY_AND_ASSIGN(EasyUnlockNotificationControllerStub); | |
32 }; | |
33 | |
34 } // namespace | |
35 | |
36 std::unique_ptr<EasyUnlockNotificationController> | |
37 EasyUnlockNotificationController::Create(Profile* profile) { | |
38 #if defined(OS_CHROMEOS) | |
39 return base::MakeUnique<EasyUnlockNotificationControllerChromeOS>( | |
40 profile, message_center::MessageCenter::Get()); | |
Peter Beverloo
2017/07/07 18:36:58
Will this functionality stay restricted to Chrome
Tim Song
2017/07/07 19:54:04
Yes. At the moment these notifications are only in
| |
41 #else | |
42 return base::MakeUnique<EasyUnlockNotificationControllerStub>(); | |
43 #endif | |
44 } | |
OLD | NEW |