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

Unified Diff: ios/chrome/app/startup/background_upload_alert.mm

Issue 2609543002: Refactor setup of background upload alert from MC to separate file. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/app/startup/background_upload_alert.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ios/chrome/app/startup/background_upload_alert.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698