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

Unified Diff: extensions/common/features/simple_feature.h

Issue 1047943002: Cache --whitelisted-extension-id in SimpleFeature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests that fail on memory bots. Created 5 years, 8 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
Index: extensions/common/features/simple_feature.h
diff --git a/extensions/common/features/simple_feature.h b/extensions/common/features/simple_feature.h
index 9d8c539414bb42f775911dbd76fa7c1cbaed192f..5ec95cf91b4a55e2714bcb176e960f4a29cdbe11 100644
--- a/extensions/common/features/simple_feature.h
+++ b/extensions/common/features/simple_feature.h
@@ -29,6 +29,18 @@ class SimpleFeatureTest;
class SimpleFeature : public Feature {
public:
+ // Used by tests to override the cached --whitelisted-extension-id.
+ class ScopedWhitelistForTest {
+ public:
+ explicit ScopedWhitelistForTest(const std::string& id);
+ ~ScopedWhitelistForTest();
+
+ private:
+ std::string* previous_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedWhitelistForTest);
+ };
+
SimpleFeature();
~SimpleFeature() override;

Powered by Google App Engine
This is Rietveld 408576698