| Index: chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h
|
| diff --git a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h
|
| index ec9c2515b3de9ae0cb049c75c7a129533a35a702..281ae5f9406f97f9f4cf45a7a060e5ae10764e1c 100644
|
| --- a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h
|
| +++ b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h
|
| @@ -50,11 +50,15 @@ class UserCloudPolicyManagerFactory : public BrowserContextKeyedBaseFactory {
|
| //
|
| // If |force_immediate_load| is true, policy is loaded synchronously from
|
| // UserCloudPolicyStore at startup.
|
| - static scoped_ptr<UserCloudPolicyManager> CreateForProfile(
|
| + static scoped_ptr<UserCloudPolicyManager> CreateForOriginalProfile(
|
| Profile* profile,
|
| bool force_immediate_load,
|
| scoped_refptr<base::SequencedTaskRunner> background_task_runner);
|
|
|
| + static UserCloudPolicyManager* RegisterForOffTheRecordProfile(
|
| + Profile* original_profile,
|
| + Profile* off_the_record_profile);
|
| +
|
| private:
|
| friend class UserCloudPolicyManager;
|
| friend struct DefaultSingletonTraits<UserCloudPolicyManagerFactory>;
|
| @@ -64,23 +68,29 @@ class UserCloudPolicyManagerFactory : public BrowserContextKeyedBaseFactory {
|
|
|
| // See comments for the static versions above.
|
| UserCloudPolicyManager* GetManagerForProfile(Profile* profile);
|
| - scoped_ptr<UserCloudPolicyManager> CreateManagerForProfile(
|
| +
|
| + scoped_ptr<UserCloudPolicyManager> CreateManagerForOriginalProfile(
|
| Profile* profile,
|
| bool force_immediate_load,
|
| scoped_refptr<base::SequencedTaskRunner> background_task_runner);
|
|
|
| + UserCloudPolicyManager* RegisterManagerForOffTheRecordProfile(
|
| + Profile* original_profile,
|
| + Profile* off_the_record_profile);
|
| +
|
| // BrowserContextKeyedBaseFactory:
|
| virtual void BrowserContextShutdown(
|
| - content::BrowserContext* profile) OVERRIDE;
|
| + content::BrowserContext* context) OVERRIDE;
|
| virtual void SetEmptyTestingFactory(
|
| - content::BrowserContext* profile) OVERRIDE;
|
| - virtual void CreateServiceNow(content::BrowserContext* profile) OVERRIDE;
|
| + content::BrowserContext* context) OVERRIDE;
|
| + virtual void CreateServiceNow(content::BrowserContext* context) OVERRIDE;
|
|
|
| // Invoked by UserCloudPolicyManager to register/unregister instances.
|
| void Register(Profile* profile, UserCloudPolicyManager* instance);
|
| void Unregister(Profile* profile, UserCloudPolicyManager* instance);
|
|
|
| typedef std::map<Profile*, UserCloudPolicyManager*> ManagerMap;
|
| +
|
| ManagerMap managers_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerFactory);
|
|
|