Index: chrome/test/live_sync/live_sync_extension_helper.h |
diff --git a/chrome/test/live_sync/live_sync_extension_helper.h b/chrome/test/live_sync/live_sync_extension_helper.h |
index 188d9b304492385891abfb4cca6ef51b53235c49..8d93f200faa56d4cab1bf14bb58e0955b04494f2 100644 |
--- a/chrome/test/live_sync/live_sync_extension_helper.h |
+++ b/chrome/test/live_sync/live_sync_extension_helper.h |
@@ -20,8 +20,14 @@ class Profile; |
class LiveSyncExtensionHelper { |
public: |
- enum ExtensionState { DISABLED, PENDING, ENABLED }; |
- |
+ struct ExtensionState { |
akalin
2011/06/09 23:44:39
Move this to private section
braffert
2011/06/10 01:23:58
Done.
|
+ ExtensionState(); |
+ ~ExtensionState(); |
+ enum EnabledState { DISABLED, PENDING, ENABLED }; |
+ bool Equals(const ExtensionState &other) const; |
+ EnabledState enabled_state; |
+ bool incognito_enabled; |
+ }; |
typedef std::map<std::string, ExtensionState> ExtensionStateMap; |
LiveSyncExtensionHelper(); |
@@ -41,6 +47,18 @@ class LiveSyncExtensionHelper { |
// Uninstalls the extension with the given name from |profile|. |
void UninstallExtension(Profile* profile, const std::string& name); |
+ // Enables the extension with the given name on |profile|. |
+ void EnableExtension(Profile* profile, const std::string& name); |
+ |
+ // Disables the extension with the given name on |profile|. |
+ void DisableExtension(Profile* profile, const std::string& name); |
+ |
+ // Enables the extension with the given name to run in incognito mode |
+ void IncognitoEnableExtension(Profile* profile, const std::string& name); |
+ |
+ // Disables the extension with the given name from running in incognito mode |
+ void IncognitoDisableExtension(Profile* profile, const std::string& name); |
+ |
// Returns true iff the extension with the given id is pending |
// install in |profile|. |
bool IsExtensionPendingInstallForSync( |
@@ -54,6 +72,9 @@ class LiveSyncExtensionHelper { |
// state. |
ExtensionStateMap GetExtensionStates(Profile* profile) const; |
+ // Returns true iff |profile1| and |profile2|'s extensions state maps match |
+ bool ExtensionStateMapsMatch(Profile* profile1, Profile* profile2); |
akalin
2011/06/09 23:44:39
Name this something like ExtensionStatesMatch().
braffert
2011/06/10 01:23:58
Done.
|
+ |
private: |
typedef std::map<std::string, scoped_refptr<Extension> > ExtensionNameMap; |
typedef std::map<Profile*, ExtensionNameMap> ProfileExtensionNameMap; |