OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" | 5 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h" | 10 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h" |
11 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" | 11 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" |
12 #include "chrome/browser/policy/cloud/user_cloud_policy_store.h" | 12 #include "chrome/browser/policy/cloud/user_cloud_policy_store.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/common/chrome_switches.h" | |
15 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 14 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| 15 #include "components/policy/core/common/policy_switches.h" |
16 | 16 |
17 namespace policy { | 17 namespace policy { |
18 | 18 |
19 // static | 19 // static |
20 UserCloudPolicyManagerFactory* UserCloudPolicyManagerFactory::GetInstance() { | 20 UserCloudPolicyManagerFactory* UserCloudPolicyManagerFactory::GetInstance() { |
21 return Singleton<UserCloudPolicyManagerFactory>::get(); | 21 return Singleton<UserCloudPolicyManagerFactory>::get(); |
22 } | 22 } |
23 | 23 |
24 // static | 24 // static |
25 UserCloudPolicyManager* UserCloudPolicyManagerFactory::GetForProfile( | 25 UserCloudPolicyManager* UserCloudPolicyManagerFactory::GetForProfile( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 ManagerMap::iterator entry = managers_.find(profile); | 100 ManagerMap::iterator entry = managers_.find(profile); |
101 if (entry != managers_.end()) { | 101 if (entry != managers_.end()) { |
102 DCHECK_EQ(instance, entry->second); | 102 DCHECK_EQ(instance, entry->second); |
103 managers_.erase(entry); | 103 managers_.erase(entry); |
104 } else { | 104 } else { |
105 NOTREACHED(); | 105 NOTREACHED(); |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 } // namespace policy | 109 } // namespace policy |
OLD | NEW |