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

Unified Diff: chrome/browser/supervised_user/supervised_user_service.h

Issue 384893002: Add #ifdefs for the extensions parts of SupervisedUserService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/supervised_user/supervised_user_service.h
diff --git a/chrome/browser/supervised_user/supervised_user_service.h b/chrome/browser/supervised_user/supervised_user_service.h
index db16426599ef0fd6d164082f13b91af436cf5a02..a92e34d257f1748e58cd50a390d91a3f71b9fed8 100644
--- a/chrome/browser/supervised_user/supervised_user_service.h
+++ b/chrome/browser/supervised_user/supervised_user_service.h
@@ -20,8 +20,11 @@
#include "chrome/browser/ui/browser_list_observer.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/web_contents.h"
+
+#if defined(ENABLE_EXTENSIONS)
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/browser/management_policy.h"
+#endif
class Browser;
class GoogleServiceAuthError;
@@ -44,9 +47,11 @@ class PrefRegistrySyncable;
// (e.g. the installed content packs, the default URL filtering behavior, or
// manual whitelist/blacklist overrides).
class SupervisedUserService : public KeyedService,
+#if defined(ENABLE_EXTENSIONS)
public extensions::ManagementPolicy::Provider,
- public ProfileSyncServiceObserver,
public extensions::ExtensionRegistryObserver,
+#endif
+ public ProfileSyncServiceObserver,
public chrome::BrowserListObserver {
public:
typedef std::vector<base::string16> CategoryList;
@@ -149,6 +154,7 @@ class SupervisedUserService : public KeyedService,
void AddNavigationBlockedCallback(const NavigationBlockedCallback& callback);
void DidBlockNavigation(content::WebContents* web_contents);
+#if defined(ENABLE_EXTENSIONS)
// extensions::ManagementPolicy::Provider implementation:
virtual std::string GetDebugPolicyProviderName() const OVERRIDE;
virtual bool UserMayLoad(const extensions::Extension* extension,
@@ -156,9 +162,6 @@ class SupervisedUserService : public KeyedService,
virtual bool UserMayModifySettings(const extensions::Extension* extension,
base::string16* error) const OVERRIDE;
- // ProfileSyncServiceObserver implementation:
- virtual void OnStateChanged() OVERRIDE;
-
// extensions::ExtensionRegistryObserver implementation.
virtual void OnExtensionLoaded(
content::BrowserContext* browser_context,
@@ -167,6 +170,10 @@ class SupervisedUserService : public KeyedService,
content::BrowserContext* browser_context,
const extensions::Extension* extension,
extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
+#endif
+
+ // ProfileSyncServiceObserver implementation:
+ virtual void OnStateChanged() OVERRIDE;
// chrome::BrowserListObserver implementation:
virtual void OnBrowserSetLastActive(Browser* browser) OVERRIDE;
@@ -226,6 +233,7 @@ class SupervisedUserService : public KeyedService,
bool ProfileIsSupervised() const;
+#if defined(ENABLE_EXTENSIONS)
// Internal implementation for ExtensionManagementPolicy::Delegate methods.
// If |error| is not NULL, it will be filled with an error message if the
// requested extension action (install, modify status, etc.) is not permitted.
@@ -236,6 +244,10 @@ class SupervisedUserService : public KeyedService,
// supervised profile.
ScopedVector<SupervisedUserSiteList> GetActiveSiteLists();
+ // Extensions helper to SetActive().
+ void SetExtensionsActive();
+#endif
+
SupervisedUserSettingsService* GetSettingsService();
void OnSupervisedUserIdChanged();
@@ -259,9 +271,11 @@ class SupervisedUserService : public KeyedService,
Delegate* delegate_;
+#if defined(ENABLE_EXTENSIONS)
ScopedObserver<extensions::ExtensionRegistry,
extensions::ExtensionRegistryObserver>
extension_registry_observer_;
+#endif
PrefChangeRegistrar pref_change_registrar_;

Powered by Google App Engine
This is Rietveld 408576698