Commit 026e0ec7 authored by Alexander Hendrich's avatar Alexander Hendrich Committed by Commit Bot

Don't remove extension with damaged file from ExternalCacheImpl's input

ExternalCacheImpl's |extensions| reflects the "input" of which
extensions it should try to load + cache. |cached_extensions_| reflects
the "output" of which extensions are currently cached. When a damaged
file is detected, that file + extension should be removed from the
cache, which means that it should *only* be removed from
|cached_extensions_|, not from |extensions_|.
Also removing the extension entry from |extensions_| will result in
ExternalCacheImpl's IsExtensionPending() returning an invalid result.

Bug: 1115905
Change-Id: I4ca82caf3d27d65a31ba481a0320c273d80b2655
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362906Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Auto-Submit: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801084}
parent ec424376
......@@ -113,7 +113,6 @@ void ExternalCacheImpl::OnDamagedFileDetected(const base::FilePath& path) {
LOG(ERROR) << "ExternalCacheImpl extension at " << path.value()
<< " failed to install, deleting it.";
cached_extensions_->Remove(id, NULL);
extensions_->Remove(id, NULL);
local_cache_.RemoveExtension(id, std::string());
UpdateExtensionLoader();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment