Chromium Code Reviews| 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..222c60a894512f6e6ddd82d41897f507b0f3867c 100644 |
| --- a/chrome/test/live_sync/live_sync_extension_helper.h |
| +++ b/chrome/test/live_sync/live_sync_extension_helper.h |
| @@ -20,8 +20,12 @@ class Profile; |
| class LiveSyncExtensionHelper { |
| public: |
| - enum ExtensionState { DISABLED, PENDING, ENABLED }; |
| - |
| + struct ExtensionState { |
| + enum EnabledState { DISABLED, PENDING, ENABLED }; |
| + bool operator==(const ExtensionState &other) const; |
|
akalin
2011/06/09 20:35:37
Do you need this? If so, operator overloading is
braffert
2011/06/09 23:09:35
Done. This required some additional changes, beca
|
| + EnabledState enabled_state; |
|
akalin
2011/06/09 20:35:37
please define a default constructor to set these v
braffert
2011/06/09 23:09:35
Done.
|
| + bool incognito_enabled; |
| + }; |
| typedef std::map<std::string, ExtensionState> ExtensionStateMap; |
| LiveSyncExtensionHelper(); |
| @@ -41,6 +45,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( |