Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Side by Side Diff: chrome/browser/signin/easy_unlock_notification_controller.cc

Issue 2968323002: [EasyUnlock] Introduce EasyUnlockNotificationController (Closed)
Patch Set: fix unittests Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698