| Index: ios/chrome/app/startup/background_upload_alert.mm
|
| diff --git a/ios/chrome/app/startup/background_upload_alert.mm b/ios/chrome/app/startup/background_upload_alert.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6b4b399b9af6300ea7edf4615f14e08638bed4bc
|
| --- /dev/null
|
| +++ b/ios/chrome/app/startup/background_upload_alert.mm
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ios/chrome/app/startup/background_upload_alert.h"
|
| +
|
| +#include "ios/chrome/browser/experimental_flags.h"
|
| +
|
| +@implementation BackgroundUploadAlert
|
| +
|
| ++ (void)setupBackgroundUploadAlert {
|
| + if (experimental_flags::IsAlertOnBackgroundUploadEnabled()) {
|
| + if ([UIApplication instancesRespondToSelector:
|
| + @selector(registerUserNotificationSettings:)]) {
|
| + [[UIApplication sharedApplication]
|
| + registerUserNotificationSettings:
|
| + [UIUserNotificationSettings
|
| + settingsForTypes:UIUserNotificationTypeAlert |
|
| + UIUserNotificationTypeBadge |
|
| + UIUserNotificationTypeSound
|
| + categories:nil]];
|
| + }
|
| + }
|
| +}
|
| +
|
| +@end
|
|
|