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

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

Issue 2720303002: Do nothing on OnSessionStopped if ARC is being restarted. (Closed)
Patch Set: Address comments. Created 3 years, 9 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
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/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
12 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 11 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
13 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/chrome_pages.h" 13 #include "chrome/browser/ui/chrome_pages.h"
15 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
16 #include "components/arc/arc_bridge_service.h" 15 #include "components/arc/arc_bridge_service.h"
17 #include "components/user_manager/user_manager.h" 16 #include "components/user_manager/user_manager.h"
18 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
19 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/chromeos/resources/grit/ui_chromeos_resources.h" 19 #include "ui/chromeos/resources/grit/ui_chromeos_resources.h"
21 #include "ui/message_center/message_center.h" 20 #include "ui/message_center/message_center.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 IDR_DISK_SPACE_NOTIFICATION_CRITICAL)), 83 IDR_DISK_SPACE_NOTIFICATION_CRITICAL)),
85 base::UTF8ToUTF16(kDisplaySource), GURL(), notifier_id, 84 base::UTF8ToUTF16(kDisplaySource), GURL(), notifier_id,
86 optional_fields, new LowDiskSpaceErrorNotificationDelegate())); 85 optional_fields, new LowDiskSpaceErrorNotificationDelegate()));
87 } 86 }
88 87
89 } // namespace 88 } // namespace
90 89
91 ArcBootErrorNotification::ArcBootErrorNotification( 90 ArcBootErrorNotification::ArcBootErrorNotification(
92 ArcBridgeService* bridge_service) 91 ArcBridgeService* bridge_service)
93 : ArcService(bridge_service) { 92 : ArcService(bridge_service) {
94 ArcSessionManager::Get()->AddSessionObserver(this); 93 ArcSessionManager::Get()->AddObserver(this);
95 } 94 }
96 95
97 ArcBootErrorNotification::~ArcBootErrorNotification() { 96 ArcBootErrorNotification::~ArcBootErrorNotification() {
98 ArcSessionManager::Get()->RemoveSessionObserver(this); 97 ArcSessionManager::Get()->RemoveObserver(this);
99 } 98 }
100 99
101 void ArcBootErrorNotification::OnSessionStopped(StopReason reason) { 100 void ArcBootErrorNotification::OnArcSessionStopped(ArcStopReason reason) {
102 if (reason == StopReason::LOW_DISK_SPACE) 101 if (reason == ArcStopReason::LOW_DISK_SPACE)
103 ShowLowDiskSpaceErrorNotification(); 102 ShowLowDiskSpaceErrorNotification();
104 } 103 }
105 104
106 } // namespace arc 105 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/notification/arc_boot_error_notification.h ('k') | components/arc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698