OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/asynchronous_policy_loader.h" | 5 #include "chrome/browser/policy/asynchronous_policy_loader.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "chrome/browser/browser_thread.h" | |
10 | 9 |
11 namespace policy { | 10 namespace policy { |
12 | 11 |
13 AsynchronousPolicyLoader::AsynchronousPolicyLoader( | 12 AsynchronousPolicyLoader::AsynchronousPolicyLoader( |
14 AsynchronousPolicyProvider::Delegate* delegate) | 13 AsynchronousPolicyProvider::Delegate* delegate) |
15 : delegate_(delegate), | 14 : delegate_(delegate), |
16 provider_(NULL), | 15 provider_(NULL), |
17 origin_loop_(MessageLoop::current()) {} | 16 origin_loop_(MessageLoop::current()) {} |
18 | 17 |
19 void AsynchronousPolicyLoader::Init() { | 18 void AsynchronousPolicyLoader::Init() { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 policy_.reset(new_policy.release()); | 66 policy_.reset(new_policy.release()); |
68 // TODO(danno): Change the notification between the provider and the | 67 // TODO(danno): Change the notification between the provider and the |
69 // PrefStore into a notification mechanism, removing the need for the | 68 // PrefStore into a notification mechanism, removing the need for the |
70 // WeakPtr for the provider. | 69 // WeakPtr for the provider. |
71 if (provider_) | 70 if (provider_) |
72 provider_->NotifyStoreOfPolicyChange(); | 71 provider_->NotifyStoreOfPolicyChange(); |
73 } | 72 } |
74 } | 73 } |
75 | 74 |
76 } // namespace policy | 75 } // namespace policy |
OLD | NEW |