OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHROMEO
S_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHROMEO
S_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHROMEO
S_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHROMEO
S_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // will return the created instance as long as it lives. | 55 // will return the created instance as long as it lives. |
56 // | 56 // |
57 // If |force_immediate_load| is true, policy is loaded synchronously from | 57 // If |force_immediate_load| is true, policy is loaded synchronously from |
58 // UserCloudPolicyStore at startup. | 58 // UserCloudPolicyStore at startup. |
59 static scoped_ptr<UserCloudPolicyManagerChromeOS> CreateForProfile( | 59 static scoped_ptr<UserCloudPolicyManagerChromeOS> CreateForProfile( |
60 Profile* profile, | 60 Profile* profile, |
61 bool force_immediate_load, | 61 bool force_immediate_load, |
62 scoped_refptr<base::SequencedTaskRunner> background_task_runner); | 62 scoped_refptr<base::SequencedTaskRunner> background_task_runner); |
63 | 63 |
64 private: | 64 private: |
65 friend struct DefaultSingletonTraits<UserCloudPolicyManagerFactoryChromeOS>; | 65 friend struct base::DefaultSingletonTraits< |
| 66 UserCloudPolicyManagerFactoryChromeOS>; |
66 | 67 |
67 UserCloudPolicyManagerFactoryChromeOS(); | 68 UserCloudPolicyManagerFactoryChromeOS(); |
68 ~UserCloudPolicyManagerFactoryChromeOS() override; | 69 ~UserCloudPolicyManagerFactoryChromeOS() override; |
69 | 70 |
70 // See comments for the static versions above. | 71 // See comments for the static versions above. |
71 UserCloudPolicyManagerChromeOS* GetManagerForProfile(Profile* profile); | 72 UserCloudPolicyManagerChromeOS* GetManagerForProfile(Profile* profile); |
72 scoped_ptr<UserCloudPolicyManagerChromeOS> CreateManagerForProfile( | 73 scoped_ptr<UserCloudPolicyManagerChromeOS> CreateManagerForProfile( |
73 Profile* profile, | 74 Profile* profile, |
74 bool force_immediate_load, | 75 bool force_immediate_load, |
75 scoped_refptr<base::SequencedTaskRunner> background_task_runner); | 76 scoped_refptr<base::SequencedTaskRunner> background_task_runner); |
76 | 77 |
77 // BrowserContextKeyedBaseFactory: | 78 // BrowserContextKeyedBaseFactory: |
78 void BrowserContextShutdown(content::BrowserContext* context) override; | 79 void BrowserContextShutdown(content::BrowserContext* context) override; |
79 void BrowserContextDestroyed(content::BrowserContext* context) override; | 80 void BrowserContextDestroyed(content::BrowserContext* context) override; |
80 void SetEmptyTestingFactory(content::BrowserContext* context) override; | 81 void SetEmptyTestingFactory(content::BrowserContext* context) override; |
81 bool HasTestingFactory(content::BrowserContext* context) override; | 82 bool HasTestingFactory(content::BrowserContext* context) override; |
82 void CreateServiceNow(content::BrowserContext* context) override; | 83 void CreateServiceNow(content::BrowserContext* context) override; |
83 | 84 |
84 typedef std::map<Profile*, UserCloudPolicyManagerChromeOS*> ManagerMap; | 85 typedef std::map<Profile*, UserCloudPolicyManagerChromeOS*> ManagerMap; |
85 ManagerMap managers_; | 86 ManagerMap managers_; |
86 | 87 |
87 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerFactoryChromeOS); | 88 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerFactoryChromeOS); |
88 }; | 89 }; |
89 | 90 |
90 } // namespace policy | 91 } // namespace policy |
91 | 92 |
92 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHRO
MEOS_H_ | 93 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHRO
MEOS_H_ |
OLD | NEW |