OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 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 "ios/chrome/app/startup/background_upload_alert.h" |
| 6 |
| 7 #include "ios/chrome/browser/experimental_flags.h" |
| 8 |
| 9 @implementation BackgroundUploadAlert |
| 10 |
| 11 + (void)setupBackgroundUploadAlert { |
| 12 if (experimental_flags::IsAlertOnBackgroundUploadEnabled()) { |
| 13 if ([UIApplication instancesRespondToSelector: |
| 14 @selector(registerUserNotificationSettings:)]) { |
| 15 [[UIApplication sharedApplication] |
| 16 registerUserNotificationSettings: |
| 17 [UIUserNotificationSettings |
| 18 settingsForTypes:UIUserNotificationTypeAlert | |
| 19 UIUserNotificationTypeBadge | |
| 20 UIUserNotificationTypeSound |
| 21 categories:nil]]; |
| 22 } |
| 23 } |
| 24 } |
| 25 |
| 26 @end |
OLD | NEW |