OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/policy/cloud/user_cloud_policy_invalidator.h" | 5 #include "chrome/browser/policy/cloud/user_cloud_policy_invalidator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/invalidation/invalidation_service_factory.h" | 10 #include "chrome/browser/invalidation/invalidation_service_factory.h" |
11 #include "chrome/browser/policy/cloud/cloud_policy_manager.h" | 11 #include "components/policy/core/common/cloud/cloud_policy_manager.h" |
12 #include "content/public/browser/notification_source.h" | 12 #include "content/public/browser/notification_source.h" |
13 | 13 |
14 namespace policy { | 14 namespace policy { |
15 | 15 |
16 UserCloudPolicyInvalidator::UserCloudPolicyInvalidator( | 16 UserCloudPolicyInvalidator::UserCloudPolicyInvalidator( |
17 Profile* profile, | 17 Profile* profile, |
18 CloudPolicyManager* policy_manager) | 18 CloudPolicyManager* policy_manager) |
19 : CloudPolicyInvalidator( | 19 : CloudPolicyInvalidator( |
20 policy_manager->core(), | 20 policy_manager->core(), |
21 base::MessageLoopProxy::current()), | 21 base::MessageLoopProxy::current()), |
(...skipping 23 matching lines...) Expand all Loading... |
45 // Initialize now that profile creation is complete and the invalidation | 45 // Initialize now that profile creation is complete and the invalidation |
46 // service can safely be initialized. | 46 // service can safely be initialized. |
47 DCHECK(type == chrome::NOTIFICATION_PROFILE_ADDED); | 47 DCHECK(type == chrome::NOTIFICATION_PROFILE_ADDED); |
48 invalidation::InvalidationService* invalidation_service = | 48 invalidation::InvalidationService* invalidation_service = |
49 invalidation::InvalidationServiceFactory::GetForProfile(profile_); | 49 invalidation::InvalidationServiceFactory::GetForProfile(profile_); |
50 if (invalidation_service) | 50 if (invalidation_service) |
51 Initialize(invalidation_service); | 51 Initialize(invalidation_service); |
52 } | 52 } |
53 | 53 |
54 } // namespace policy | 54 } // namespace policy |
OLD | NEW |