Index: ios/chrome/app/application_delegate/memory_recovery_helper.h |
diff --git a/ios/chrome/app/application_delegate/memory_recovery_helper.h b/ios/chrome/app/application_delegate/memory_recovery_helper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a2450e3513196c644a4ad61e0e5e007480893aef |
--- /dev/null |
+++ b/ios/chrome/app/application_delegate/memory_recovery_helper.h |
@@ -0,0 +1,26 @@ |
+// Copyright 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. |
+ |
+#ifndef IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_ |
+#define IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_ |
+ |
+#import <UIKit/UIKit.h> |
Eugene But (OOO till 7-30)
2016/05/18 15:55:07
NIT: s/UIKit/Foundation there is nothing UI relate
gambard
2016/05/19 09:35:03
Done.
|
+ |
+// Helper for handling memory warnings |
sdefresne
2016/05/18 18:32:38
Please use full sentences for your comments (i.e.
gambard
2016/05/19 09:35:03
Done.
|
+@interface MemoryRecoveryHelper : NSObject |
Eugene But (OOO till 7-30)
2016/05/18 15:55:07
Should we be more specific with the name to reflec
gambard
2016/05/19 09:35:03
Done.
|
+ |
+// The number of memory warnings that have been received in this |
+// foreground session. |
+@property(nonatomic, readonly) int foregroundMemoryWarningCount; |
sdefresne
2016/05/18 18:32:38
Maybe use NSInteger instead of int here?
gambard
2016/05/19 09:35:03
Done.
|
+ |
+// Frees as much memory as possible and registers that there was a memory |
+// pressure |
+- (void)handleMemoryPressure; |
+ |
+// Resets the foregroundMemoryWarningCount property, setting its value to 0 |
+- (void)resetForegroundMemoryWarningCount; |
+ |
+@end |
+ |
+#endif // IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_ |