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

Unified Diff: ios/chrome/browser/snapshots/snapshot_cache.mm

Issue 2881183002: Revert of Replace ObjCPropertyReleaser with ReleaseProperties() project-wide. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/snapshots/snapshot_cache.mm
diff --git a/ios/chrome/browser/snapshots/snapshot_cache.mm b/ios/chrome/browser/snapshots/snapshot_cache.mm
index a2174949b9af2fa022eb02952cddf29d9582a54a..7fb720d8c21ab9c55791dd7c850208a8d56a891a 100644
--- a/ios/chrome/browser/snapshots/snapshot_cache.mm
+++ b/ios/chrome/browser/snapshots/snapshot_cache.mm
@@ -13,7 +13,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/mac/bind_objc_block.h"
-#include "base/mac/objc_release_properties.h"
+#include "base/mac/objc_property_releaser.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
@@ -157,6 +157,8 @@
// be requested to be saved to disk when the application is backgrounded.
base::scoped_nsobject<NSString> backgroundingImageSessionId_;
base::scoped_nsobject<UIImage> backgroundingColorImage_;
+
+ base::mac::ObjCPropertyReleaser propertyReleaser_SnapshotCache_;
}
@synthesize pinnedIDs = pinnedIDs_;
@@ -169,6 +171,8 @@
- (id)init {
if ((self = [super init])) {
DCHECK_CURRENTLY_ON(web::WebThread::UI);
+ propertyReleaser_SnapshotCache_.Init(self, [SnapshotCache class]);
+
if ([self usesLRUCache]) {
lruCache_.reset(
[[LRUCache alloc] initWithCacheSize:kLRUCacheMaxCapacity]);
@@ -208,7 +212,6 @@
removeObserver:self
name:UIApplicationDidBecomeActiveNotification
object:nil];
- base::mac::ReleaseProperties(self);
[super dealloc];
}

Powered by Google App Engine
This is Rietveld 408576698