Chromium Code Reviews| Index: chrome/browser/extensions/updater/local_extension_cache.cc |
| diff --git a/chrome/browser/extensions/updater/local_extension_cache.cc b/chrome/browser/extensions/updater/local_extension_cache.cc |
| index b4c588f8d9e7660f1673fdc7babfc3066ee30705..b6bb926ae5adbe075997e0e5a0c3ce6b9ab12e49 100644 |
| --- a/chrome/browser/extensions/updater/local_extension_cache.cc |
| +++ b/chrome/browser/extensions/updater/local_extension_cache.cc |
| @@ -426,8 +426,10 @@ void LocalExtensionCache::OnCacheEntryInstalled( |
| callback.Run(info.file_path, true); |
| return; |
| } |
| + it->second = info; |
| + } else { |
| + it = cached_extensions_.insert(std::make_pair(id, info)).first; |
| } |
| - it = cached_extensions_.insert(std::make_pair(id, info)).first; |
|
jennyz
2014/05/09 20:08:08
std::map won't insert the element if the key exist
|
| // Time from file system can have lower precision so use precise "now". |
| it->second.last_used = base::Time::Now(); |