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

Unified Diff: chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h

Issue 52343002: policy: Register OffTheRecordProfile at UserCloudPolicyManagerFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698