| Index: chrome/browser/extensions/updater/extension_cache.h
|
| diff --git a/extensions/browser/updater/extension_cache.h b/chrome/browser/extensions/updater/extension_cache.h
|
| similarity index 82%
|
| rename from extensions/browser/updater/extension_cache.h
|
| rename to chrome/browser/extensions/updater/extension_cache.h
|
| index f6bdb02ca554f6e9b60cbf6118029ee6348786c5..edcc1fa3d3ec91f75993859578c0f9f6f8b11100 100644
|
| --- a/extensions/browser/updater/extension_cache.h
|
| +++ b/chrome/browser/extensions/updater/extension_cache.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef EXTENSIONS_BROWSER_UPDATER_EXTENSION_CACHE_H_
|
| -#define EXTENSIONS_BROWSER_UPDATER_EXTENSION_CACHE_H_
|
| +#ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_H_
|
|
|
| #include <string>
|
|
|
| @@ -16,13 +16,13 @@ namespace extensions {
|
| // between multiple users and profiles on the machine.
|
| class ExtensionCache {
|
| public:
|
| + // Return global singleton instance of ExtensionCache.
|
| + static ExtensionCache* GetInstance();
|
| +
|
| // Callback that is invoked when the file placed when PutExtension done.
|
| typedef base::Callback<void(const base::FilePath& file_path,
|
| bool file_ownership_passed)> PutExtensionCallback;
|
|
|
| - ExtensionCache() {}
|
| - virtual ~ExtensionCache() {}
|
| -
|
| // Initialize cache in background. The |callback| is called when cache ready.
|
| // Can be called multiple times. The |callback| can be called immediately if
|
| // cache is ready.
|
| @@ -54,10 +54,14 @@ class ExtensionCache {
|
| const std::string& version,
|
| const PutExtensionCallback& callback) = 0;
|
|
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(ExtensionCache);
|
| + protected:
|
| + virtual ~ExtensionCache() {}
|
| +
|
| + // Sets the singleton to the given |cache|. Returns the previous value of
|
| + // the singleton. Ownership is not transferred.
|
| + static ExtensionCache* SetForTesting(ExtensionCache* cache);
|
| };
|
|
|
| } // namespace extensions
|
|
|
| -#endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_CACHE_H_
|
| +#endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_H_
|
|
|