| Index: chrome/browser/android/thumbnail/scoped_ptr_expiring_cache.h
|
| diff --git a/chrome/browser/android/thumbnail/scoped_ptr_expiring_cache.h b/chrome/browser/android/thumbnail/scoped_ptr_expiring_cache.h
|
| index 912a4a15b746601423401c11dfa08fab2c79480f..00a680178da2c4240377a56fde619376d4ba1221 100644
|
| --- a/chrome/browser/android/thumbnail/scoped_ptr_expiring_cache.h
|
| +++ b/chrome/browser/android/thumbnail/scoped_ptr_expiring_cache.h
|
| @@ -38,12 +38,14 @@ class ScopedPtrExpiringCache {
|
| return NULL;
|
| }
|
|
|
| - void Remove(const Key& key) {
|
| + std::unique_ptr<Value> Remove(const Key& key) {
|
| iterator iter = map_.find(key);
|
| + std::unique_ptr<Value> value;
|
| if (iter != map_.end()) {
|
| - delete iter->second;
|
| + value.reset(iter->second);
|
| map_.erase(key);
|
| }
|
| + return std::move(value);
|
| }
|
|
|
| void Clear() {
|
|
|