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

Unified Diff: chrome/browser/extensions/extension_info_map.h

Issue 7024056: Handle extension webrequest API on the IO thread. This speeds up blocking event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 6 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: chrome/browser/extensions/extension_info_map.h
diff --git a/chrome/browser/extensions/extension_info_map.h b/chrome/browser/extensions/extension_info_map.h
index 1c1edb05d7bb99fdeaa86ab1d43d3e05e3fc5520..63a6346a1233515f15b0570122b51b9dcd155e16 100644
--- a/chrome/browser/extensions/extension_info_map.h
+++ b/chrome/browser/extensions/extension_info_map.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/time.h"
#include "base/memory/ref_counted.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
@@ -29,15 +30,36 @@ class ExtensionInfoMap : public base::RefCountedThreadSafe<ExtensionInfoMap> {
}
// Callback for when new extensions are loaded.
- void AddExtension(const Extension* extension);
+ void AddExtension(const Extension* extension,
+ base::Time install_time,
+ bool incognito_enabled);
// Callback for when an extension is unloaded.
- void RemoveExtension(const std::string& id,
+ void RemoveExtension(const std::string& extension_id,
const UnloadedExtensionInfo::Reason reason);
+ // Returns the time the extension was installed, or base::Time() if not found.
+ base::Time GetInstallTime(const std::string& extension_id) const;
+
+ // Returns true if the user has allowed this extension to run in incognito
+ // mode.
+ bool IsIncognitoEnabled(const std::string& extension_id) const;
+
+ // Returns true if the given extension can see events and data from another
+ // sub-profile (incognito to original profile, or vice versa).
+ bool CanCrossIncognito(const Extension* extension);
+
private:
+ // Extra dynamic data related to an extension.
+ struct ExtraData;
+ // Map of extension_id to ExtraData.
+ typedef std::map<std::string, ExtraData> ExtraDataMap;
+
ExtensionSet extensions_;
ExtensionSet disabled_extensions_;
+
+ // Extra data associated with enabled extensions.
+ ExtraDataMap extra_data_;
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/extension_info_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698