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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months 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 unified diff | Download patch
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698