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

Side by Side Diff: chrome/browser/extensions/updater/extension_cache_impl.h

Issue 832683004: Disable caching "Chrome Hotword Shared Module" extension (temporary). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fixes. 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/updater/extension_cache_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_
6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Implementation of content::NotificationObserver: 46 // Implementation of content::NotificationObserver:
47 virtual void Observe(int type, 47 virtual void Observe(int type,
48 const content::NotificationSource& source, 48 const content::NotificationSource& source,
49 const content::NotificationDetails& details) override; 49 const content::NotificationDetails& details) override;
50 50
51 private: 51 private:
52 // Callback that is called when local cache is ready. 52 // Callback that is called when local cache is ready.
53 void OnCacheInitialized(); 53 void OnCacheInitialized();
54 54
55 // Check if this extension is allowed to be cached.
56 bool CachingAllowed(const std::string& id);
57
55 // Cache implementation that uses local cache dir. 58 // Cache implementation that uses local cache dir.
56 scoped_ptr<LocalExtensionCache> cache_; 59 scoped_ptr<LocalExtensionCache> cache_;
57 60
58 // Set of extensions that can be cached. 61 // Set of extensions that can be cached.
59 std::set<std::string> allowed_extensions_; 62 std::set<std::string> allowed_extensions_;
60 63
61 // List of callbacks that should be called when the cache is ready. 64 // List of callbacks that should be called when the cache is ready.
62 std::vector<base::Closure> init_callbacks_; 65 std::vector<base::Closure> init_callbacks_;
63 66
64 // Observes failures to install CRX files. 67 // Observes failures to install CRX files.
65 content::NotificationRegistrar notification_registrar_; 68 content::NotificationRegistrar notification_registrar_;
66 69
67 // Weak factory for callbacks. 70 // Weak factory for callbacks.
68 base::WeakPtrFactory<ExtensionCacheImpl> weak_ptr_factory_; 71 base::WeakPtrFactory<ExtensionCacheImpl> weak_ptr_factory_;
69 72
70 DISALLOW_COPY_AND_ASSIGN(ExtensionCacheImpl); 73 DISALLOW_COPY_AND_ASSIGN(ExtensionCacheImpl);
71 }; 74 };
72 75
73 } // namespace extensions 76 } // namespace extensions
74 77
75 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_ 78 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/updater/extension_cache_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698