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

Side by Side Diff: ios/chrome/app/application_delegate/background_activity.mm

Issue 2621943002: [ObjC ARC] Converts ios/chrome/app/application_delegate:application_delegate_internal to ARC. (Closed)
Patch Set: comment Created 3 years, 11 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 #import "ios/chrome/app/application_delegate/background_activity.h" 5 #import "ios/chrome/app/application_delegate/background_activity.h"
6 6
7 #import "base/ios/weak_nsobject.h"
8 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
9 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
10 #include "base/metrics/user_metrics_action.h" 9 #include "base/metrics/user_metrics_action.h"
11 #include "base/time/time.h" 10 #include "base/time/time.h"
12 #import "ios/chrome/app/application_delegate/browser_launcher.h" 11 #import "ios/chrome/app/application_delegate/browser_launcher.h"
13 #import "ios/chrome/app/application_delegate/metrics_mediator.h" 12 #import "ios/chrome/app/application_delegate/metrics_mediator.h"
14 #import "ios/chrome/browser/crash_report/crash_report_background_uploader.h" 13 #import "ios/chrome/browser/crash_report/crash_report_background_uploader.h"
15 #include "ios/chrome/browser/metrics/first_user_action_recorder.h" 14 #include "ios/chrome/browser/metrics/first_user_action_recorder.h"
16 #import "ios/chrome/browser/metrics/previous_session_info.h" 15 #import "ios/chrome/browser/metrics/previous_session_info.h"
17 #include "url/gurl.h" 16 #include "url/gurl.h"
18 17
18 #if !defined(__has_feature) || !__has_feature(objc_arc)
19 #error "This file requires ARC support."
20 #endif
21
19 namespace { 22 namespace {
20 // Key of the UMA Startup.BackgroundFetchTimeInterval histogram. 23 // Key of the UMA Startup.BackgroundFetchTimeInterval histogram.
21 const char* const kUMAMobileBackgroundFetchTimeInterval = 24 const char* const kUMAMobileBackgroundFetchTimeInterval =
22 "Startup.BackgroundFetchTimeInterval"; 25 "Startup.BackgroundFetchTimeInterval";
23 // Key in the UserDefaults to store the date/time that the application was last 26 // Key in the UserDefaults to store the date/time that the application was last
24 // launched for a background fetch. 27 // launched for a background fetch.
25 NSString* const kLastBackgroundFetch = @"LastBackgroundFetch"; 28 NSString* const kLastBackgroundFetch = @"LastBackgroundFetch";
26 } // namespace 29 } // namespace
27 30
28 @implementation BackgroundActivity 31 @implementation BackgroundActivity
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 completionHandler(); 88 completionHandler();
86 } 89 }
87 } 90 }
88 91
89 + (void)foregroundStarted { 92 + (void)foregroundStarted {
90 [[NSUserDefaults standardUserDefaults] 93 [[NSUserDefaults standardUserDefaults]
91 removeObjectForKey:kLastBackgroundFetch]; 94 removeObjectForKey:kLastBackgroundFetch];
92 } 95 }
93 96
94 @end 97 @end
OLDNEW
« no previous file with comments | « ios/chrome/app/application_delegate/app_state.mm ('k') | ios/chrome/app/application_delegate/metrics_mediator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698