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

Unified Diff: chrome/browser/extensions/updater/extension_cache_impl.cc

Issue 832683004: Disable caching "Chrome Hotword Shared Module" extension (temporary). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698