Chromium Code Reviews| Index: chrome/browser/extensions/updater/extension_cache_impl.cc |
| diff --git a/chrome/browser/extensions/updater/extension_cache_impl.cc b/chrome/browser/extensions/updater/extension_cache_impl.cc |
| index a6300b8214294a8e46b9c1a1d1160a81b718f698..5c679f60ee034c075f5432376b6a3558d95e2f19 100644 |
| --- a/chrome/browser/extensions/updater/extension_cache_impl.cc |
| +++ b/chrome/browser/extensions/updater/extension_cache_impl.cc |
| @@ -21,6 +21,10 @@ |
| namespace extensions { |
| namespace { |
| +// Temporary workaround for M41, this extension should not be cached. |
| +// TODO: Implement id/hash-based map instead of id/version. |
|
Dmitry Polukhin
2015/01/15 09:40:38
Please use TODO(ginkage)... as in style guide and
|
| +const char kBlacklistedExt[] = "lccekmodgklaepjeofjdjpbminllajkg"; |
|
Dmitry Polukhin
2015/01/15 09:40:38
This constant already exists kHotwordSharedModuleI
|
| + |
| #if defined(OS_CHROMEOS) |
| const char kLocalCacheDir[] = "/var/cache/external_cache"; |
| #else |
| @@ -72,13 +76,15 @@ void ExtensionCacheImpl::Shutdown(const base::Closure& callback) { |
| } |
| void ExtensionCacheImpl::AllowCaching(const std::string& id) { |
| + if (id == kBlacklistedExt) |
| + return; |
| allowed_extensions_.insert(id); |
| } |
| bool ExtensionCacheImpl::GetExtension(const std::string& id, |
| base::FilePath* file_path, |
| std::string* version) { |
| - if (cache_) |
| + if (cache_ && id != kBlacklistedExt) |
|
Dmitry Polukhin
2015/01/15 09:40:38
I would check if caching allowed like this 'Contai
ginkage
2015/01/15 15:02:24
I'm not really sure: I've added this check for cas
Dmitry Polukhin
2015/01/15 15:07:48
Yes, check in GetExtension required to recover if
|
| return cache_->GetExtension(id, file_path, version); |
| else |
| return false; |