| OLD | NEW |
| 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/eol_notification.h" | 5 #include "chrome/browser/chromeos/eol_notification.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/notifications/notification.h" | 8 #include "chrome/browser/notifications/notification.h" |
| 9 #include "chrome/browser/notifications/notification_ui_manager.h" | 9 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 10 #include "chrome/browser/ui/browser_navigator.h" | 10 #include "chrome/browser/ui/browser_navigator.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 CancelNotification(); | 73 CancelNotification(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 std::string EolNotificationDelegate::id() const { | 76 std::string EolNotificationDelegate::id() const { |
| 77 return kDelegateId; | 77 return kDelegateId; |
| 78 } | 78 } |
| 79 | 79 |
| 80 void EolNotificationDelegate::OpenMoreInfoPage() { | 80 void EolNotificationDelegate::OpenMoreInfoPage() { |
| 81 chrome::NavigateParams params(profile_, GURL(chrome::kEolNotificationURL), | 81 chrome::NavigateParams params(profile_, GURL(chrome::kEolNotificationURL), |
| 82 ui::PAGE_TRANSITION_LINK); | 82 ui::PAGE_TRANSITION_LINK); |
| 83 params.disposition = NEW_FOREGROUND_TAB; | 83 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
| 84 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 84 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 85 chrome::Navigate(¶ms); | 85 chrome::Navigate(¶ms); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void EolNotificationDelegate::CancelNotification() { | 88 void EolNotificationDelegate::CancelNotification() { |
| 89 // Clean up the notification | 89 // Clean up the notification |
| 90 g_browser_process->notification_ui_manager()->CancelById( | 90 g_browser_process->notification_ui_manager()->CancelById( |
| 91 id(), NotificationUIManager::GetProfileID(profile_)); | 91 id(), NotificationUIManager::GetProfileID(profile_)); |
| 92 } | 92 } |
| 93 | 93 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 base::string16 EolNotification::GetEolMessage() { | 167 base::string16 EolNotification::GetEolMessage() { |
| 168 if (status_ == update_engine::EndOfLifeStatus::kSecurityOnly) { | 168 if (status_ == update_engine::EndOfLifeStatus::kSecurityOnly) { |
| 169 return l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_SECURITY_ONLY); | 169 return l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_SECURITY_ONLY); |
| 170 } else { | 170 } else { |
| 171 return l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_EOL); | 171 return l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_EOL); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace chromeos | 175 } // namespace chromeos |
| OLD | NEW |