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

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

Issue 660123003: Standardize usage of virtual/override/final in chrome/browser/policy/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 22 matching lines...) Expand all
33 33
34 } // namespace 34 } // namespace
35 35
36 // A KeyedService that wraps a UserCloudPolicyManager. 36 // A KeyedService that wraps a UserCloudPolicyManager.
37 class UserCloudPolicyManagerFactory::ManagerWrapper : public KeyedService { 37 class UserCloudPolicyManagerFactory::ManagerWrapper : public KeyedService {
38 public: 38 public:
39 explicit ManagerWrapper(UserCloudPolicyManager* manager) 39 explicit ManagerWrapper(UserCloudPolicyManager* manager)
40 : manager_(manager) { 40 : manager_(manager) {
41 DCHECK(manager); 41 DCHECK(manager);
42 } 42 }
43 virtual ~ManagerWrapper() {} 43 ~ManagerWrapper() override {}
44 44
45 virtual void Shutdown() override { 45 void Shutdown() override { manager_->Shutdown(); }
46 manager_->Shutdown();
47 }
48 46
49 UserCloudPolicyManager* manager() { return manager_; } 47 UserCloudPolicyManager* manager() { return manager_; }
50 48
51 private: 49 private:
52 UserCloudPolicyManager* manager_; 50 UserCloudPolicyManager* manager_;
53 51
54 DISALLOW_COPY_AND_ASSIGN(ManagerWrapper); 52 DISALLOW_COPY_AND_ASSIGN(ManagerWrapper);
55 }; 53 };
56 54
57 // static 55 // static
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return testing_factory_ != NULL; 210 return testing_factory_ != NULL;
213 } 211 }
214 212
215 void UserCloudPolicyManagerFactory::CreateServiceNow( 213 void UserCloudPolicyManagerFactory::CreateServiceNow(
216 content::BrowserContext* context) { 214 content::BrowserContext* context) {
217 DCHECK(testing_factory_); 215 DCHECK(testing_factory_);
218 manager_wrappers_[context] = new ManagerWrapper(testing_factory_(context)); 216 manager_wrappers_[context] = new ManagerWrapper(testing_factory_(context));
219 } 217 }
220 218
221 } // namespace policy 219 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698