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

Side by Side Diff: chrome/browser/chromeos/arc/notification/arc_boot_error_notification.cc

Issue 2567083002: Migrate ArcBridgeService::Observer and ArcSession::Observer. (Closed)
Patch Set: rebase Created 4 years 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/arc/notification/arc_boot_error_notification.h " 5 #include "chrome/browser/chromeos/arc/notification/arc_boot_error_notification.h "
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 10 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/chrome_pages.h" 12 #include "chrome/browser/ui/chrome_pages.h"
13 #include "chrome/grit/generated_resources.h" 13 #include "chrome/grit/generated_resources.h"
14 #include "components/arc/arc_bridge_service.h"
14 #include "components/user_manager/user_manager.h" 15 #include "components/user_manager/user_manager.h"
15 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/chromeos/resources/grit/ui_chromeos_resources.h" 18 #include "ui/chromeos/resources/grit/ui_chromeos_resources.h"
18 #include "ui/message_center/message_center.h" 19 #include "ui/message_center/message_center.h"
19 #include "ui/message_center/notification.h" 20 #include "ui/message_center/notification.h"
20 #include "ui/message_center/notification_types.h" 21 #include "ui/message_center/notification_types.h"
21 #include "ui/message_center/notifier_settings.h" 22 #include "ui/message_center/notifier_settings.h"
22 23
23 namespace arc { 24 namespace arc {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ArcBootErrorNotification::ArcBootErrorNotification( 89 ArcBootErrorNotification::ArcBootErrorNotification(
89 ArcBridgeService* bridge_service) 90 ArcBridgeService* bridge_service)
90 : ArcService(bridge_service) { 91 : ArcService(bridge_service) {
91 arc_bridge_service()->AddObserver(this); 92 arc_bridge_service()->AddObserver(this);
92 } 93 }
93 94
94 ArcBootErrorNotification::~ArcBootErrorNotification() { 95 ArcBootErrorNotification::~ArcBootErrorNotification() {
95 arc_bridge_service()->RemoveObserver(this); 96 arc_bridge_service()->RemoveObserver(this);
96 } 97 }
97 98
98 void ArcBootErrorNotification::OnBridgeStopped( 99 void ArcBootErrorNotification::OnSessionStopped(StopReason reason) {
99 ArcBridgeService::StopReason reason) { 100 if (reason == StopReason::LOW_DISK_SPACE)
100 if (reason == ArcBridgeService::StopReason::LOW_DISK_SPACE) {
101 ShowLowDiskSpaceErrorNotification(); 101 ShowLowDiskSpaceErrorNotification();
102 }
103 } 102 }
104 103
105 } // namespace arc 104 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698