Index: chrome/browser/managed_mode.h |
diff --git a/chrome/browser/managed_mode.h b/chrome/browser/managed_mode.h |
index c77e16331b958d960a5fa480920e8ed3939ad46f..9d47a3395352ca4b6c053f8425b29188838523e6 100644 |
--- a/chrome/browser/managed_mode.h |
+++ b/chrome/browser/managed_mode.h |
@@ -11,6 +11,7 @@ |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/memory/singleton.h" |
#include "chrome/browser/extensions/management_policy.h" |
#include "chrome/browser/ui/browser_list_observer.h" |
@@ -20,6 +21,7 @@ |
class Browser; |
template<typename T> |
struct DefaultSingletonTraits; |
+class ManagedModeURLFilter; |
class PrefService; |
class Profile; |
@@ -27,6 +29,7 @@ class Profile; |
// person by pre-configuring and then locking a managed User profile. |
// The ManagedMode class provides methods to check whether the browser is in |
// managed mode, and to attempt to enter or leave managed mode. |
+// Except where otherwise noted, this class should be used on the UI thread. |
class ManagedMode : public chrome::BrowserListObserver, |
public extensions::ManagementPolicy::Provider, |
public content::NotificationObserver { |
@@ -45,6 +48,9 @@ class ManagedMode : public chrome::BrowserListObserver, |
static void EnterManagedMode(Profile* profile, const EnterCallback& callback); |
static void LeaveManagedMode(); |
+ // Returns the URL filter. This method should only be called on the IO thread. |
+ static const ManagedModeURLFilter* GetURLFilter(); |
+ |
// ExtensionManagementPolicy::Provider implementation: |
virtual std::string GetDebugPolicyProviderName() const OVERRIDE; |
virtual bool UserMayLoad(const extensions::Extension* extension, |
@@ -70,8 +76,10 @@ class ManagedMode : public chrome::BrowserListObserver, |
Profile* managed_profile_; |
private: |
+ class URLFilterContext; |
+ |
+ friend class Singleton<ManagedMode, LeakySingletonTraits<ManagedMode> >; |
friend struct DefaultSingletonTraits<ManagedMode>; |
- friend class Singleton<ManagedMode>; |
FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, ManagedModeOnChange); |
FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
ManagedModeProhibitsModification); |
@@ -87,6 +95,8 @@ class ManagedMode : public chrome::BrowserListObserver, |
void LeaveManagedModeImpl(); |
+ const ManagedModeURLFilter* GetURLFilterImpl(); |
+ |
void FinalizeEnter(bool result); |
// Platform-specific methods that confirm whether we can enter or leave |
@@ -103,8 +113,12 @@ class ManagedMode : public chrome::BrowserListObserver, |
// testing). |
virtual void SetInManagedMode(Profile* newly_managed_profile); |
+ void UpdateWhitelist(); |
+ |
content::NotificationRegistrar registrar_; |
+ scoped_ptr<URLFilterContext> url_filter_context_; |
+ |
std::set<Browser*> browsers_to_close_; |
std::vector<EnterCallback> callbacks_; |