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

Unified Diff: extensions/browser/updater/null_extension_cache.h

Issue 612423003: Move ExtensionCache to //extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test setup Created 6 years, 2 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 | « extensions/browser/updater/extension_cache.h ('k') | extensions/browser/updater/null_extension_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/updater/null_extension_cache.h
diff --git a/chrome/browser/extensions/updater/extension_cache_fake.h b/extensions/browser/updater/null_extension_cache.h
similarity index 51%
copy from chrome/browser/extensions/updater/extension_cache_fake.h
copy to extensions/browser/updater/null_extension_cache.h
index 6a6869a03ac946e98ce98aa32ccbc58324c4e038..c4c9a1bd45e770ce5070d493d435b309e069ddeb 100644
--- a/chrome/browser/extensions/updater/extension_cache_fake.h
+++ b/extensions/browser/updater/null_extension_cache.h
@@ -2,24 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_FAKE_H_
-#define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_FAKE_H_
+#ifndef EXTENSIONS_BROWSER_UPDATER_NULL_EXTENSION_CACHE_H_
+#define EXTENSIONS_BROWSER_UPDATER_NULL_EXTENSION_CACHE_H_
-#include <map>
-#include <set>
-#include <string>
-
-#include "chrome/browser/extensions/updater/extension_cache.h"
+#include "extensions/browser/updater/extension_cache.h"
namespace extensions {
-// Fake implementation of extensions ExtensionCache that can be used in tests.
-class ExtensionCacheFake : public ExtensionCache {
+// Implements a pass-thru (i.e. do-nothing) ExtensionCache.
+class NullExtensionCache : public ExtensionCache {
public:
- ExtensionCacheFake();
- virtual ~ExtensionCacheFake();
+ NullExtensionCache();
+ virtual ~NullExtensionCache();
- // Implementation of ExtensionCache.
+ // ExtensionCache implementation.
virtual void Start(const base::Closure& callback) override;
virtual void Shutdown(const base::Closure& callback) override;
virtual void AllowCaching(const std::string& id) override;
@@ -32,16 +28,9 @@ class ExtensionCacheFake : public ExtensionCache {
const PutExtensionCallback& callback) override;
private:
- typedef std::map<std::string, std::pair<std::string, base::FilePath> > Map;
- // Set of extensions that can be cached.
- std::set<std::string> allowed_extensions_;
-
- // Map of know extensions.
- Map cache_;
-
- DISALLOW_COPY_AND_ASSIGN(ExtensionCacheFake);
+ DISALLOW_COPY_AND_ASSIGN(NullExtensionCache);
};
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_FAKE_H_
+#endif // EXTENSIONS_BROWSER_UPDATER_NULL_EXTENSION_CACHE_H_
« no previous file with comments | « extensions/browser/updater/extension_cache.h ('k') | extensions/browser/updater/null_extension_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698