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

Unified Diff: chrome/test/live_sync/live_sync_extension_helper.h

Issue 7104072: Adding new extension sync integration tests. Also modified the way that profile (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review changes 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/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(

Powered by Google App Engine
This is Rietveld 408576698