Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_ | |
| 6 #define IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_ | |
| 7 | |
| 8 #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.
| |
| 9 | |
| 10 // 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.
| |
| 11 @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.
| |
| 12 | |
| 13 // The number of memory warnings that have been received in this | |
| 14 // foreground session. | |
| 15 @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.
| |
| 16 | |
| 17 // Frees as much memory as possible and registers that there was a memory | |
| 18 // pressure | |
| 19 - (void)handleMemoryPressure; | |
| 20 | |
| 21 // Resets the foregroundMemoryWarningCount property, setting its value to 0 | |
| 22 - (void)resetForegroundMemoryWarningCount; | |
| 23 | |
| 24 @end | |
| 25 | |
| 26 #endif // IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_ | |
| OLD | NEW |