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

Side by Side Diff: chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc

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) 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 UserCloudPolicyManager* manager() { return manager_; } 47 UserCloudPolicyManager* manager() { return manager_; }
48 48
49 private: 49 private:
50 UserCloudPolicyManager* manager_; 50 UserCloudPolicyManager* manager_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(ManagerWrapper); 52 DISALLOW_COPY_AND_ASSIGN(ManagerWrapper);
53 }; 53 };
54 54
55 // static 55 // static
56 UserCloudPolicyManagerFactory* UserCloudPolicyManagerFactory::GetInstance() { 56 UserCloudPolicyManagerFactory* UserCloudPolicyManagerFactory::GetInstance() {
57 return Singleton<UserCloudPolicyManagerFactory>::get(); 57 return base::Singleton<UserCloudPolicyManagerFactory>::get();
58 } 58 }
59 59
60 // static 60 // static
61 UserCloudPolicyManager* UserCloudPolicyManagerFactory::GetForBrowserContext( 61 UserCloudPolicyManager* UserCloudPolicyManagerFactory::GetForBrowserContext(
62 content::BrowserContext* context) { 62 content::BrowserContext* context) {
63 return GetInstance()->GetManagerForBrowserContext(context); 63 return GetInstance()->GetManagerForBrowserContext(context);
64 } 64 }
65 65
66 // static 66 // static
67 scoped_ptr<UserCloudPolicyManager> 67 scoped_ptr<UserCloudPolicyManager>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return testing_factory_ != NULL; 210 return testing_factory_ != NULL;
211 } 211 }
212 212
213 void UserCloudPolicyManagerFactory::CreateServiceNow( 213 void UserCloudPolicyManagerFactory::CreateServiceNow(
214 content::BrowserContext* context) { 214 content::BrowserContext* context) {
215 DCHECK(testing_factory_); 215 DCHECK(testing_factory_);
216 manager_wrappers_[context] = new ManagerWrapper(testing_factory_(context)); 216 manager_wrappers_[context] = new ManagerWrapper(testing_factory_(context));
217 } 217 }
218 218
219 } // namespace policy 219 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698