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

Side by Side Diff: chrome/browser/policy/async_policy_provider.cc

Issue 78453005: Move PolicySchema and PolicySchemaRegistry to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export nested class on win Created 7 years, 1 month 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 | Annotate | Revision Log
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/async_policy_provider.h" 5 #include "chrome/browser/policy/async_policy_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/message_loop/message_loop_proxy.h"
12 #include "base/sequenced_task_runner.h" 12 #include "base/sequenced_task_runner.h"
13 #include "chrome/browser/policy/async_policy_loader.h" 13 #include "chrome/browser/policy/async_policy_loader.h"
14 #include "chrome/browser/policy/schema_registry.h"
15 #include "components/policy/core/common/policy_bundle.h" 14 #include "components/policy/core/common/policy_bundle.h"
15 #include "components/policy/core/common/schema_registry.h"
16 16
17 namespace policy { 17 namespace policy {
18 18
19 AsyncPolicyProvider::AsyncPolicyProvider( 19 AsyncPolicyProvider::AsyncPolicyProvider(
20 SchemaRegistry* registry, 20 SchemaRegistry* registry,
21 scoped_ptr<AsyncPolicyLoader> loader) 21 scoped_ptr<AsyncPolicyLoader> loader)
22 : loader_(loader.release()), 22 : loader_(loader.release()),
23 weak_factory_(this) { 23 weak_factory_(this) {
24 // Make an immediate synchronous load on startup. 24 // Make an immediate synchronous load on startup.
25 OnLoaderReloaded(loader_->InitialLoad(registry->schema_map())); 25 OnLoaderReloaded(loader_->InitialLoad(registry->schema_map()));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 scoped_refptr<base::MessageLoopProxy> loop, 125 scoped_refptr<base::MessageLoopProxy> loop,
126 base::WeakPtr<AsyncPolicyProvider> weak_this, 126 base::WeakPtr<AsyncPolicyProvider> weak_this,
127 scoped_ptr<PolicyBundle> bundle) { 127 scoped_ptr<PolicyBundle> bundle) {
128 loop->PostTask(FROM_HERE, 128 loop->PostTask(FROM_HERE,
129 base::Bind(&AsyncPolicyProvider::OnLoaderReloaded, 129 base::Bind(&AsyncPolicyProvider::OnLoaderReloaded,
130 weak_this, 130 weak_this,
131 base::Passed(&bundle))); 131 base::Passed(&bundle)));
132 } 132 }
133 133
134 } // namespace policy 134 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/async_policy_loader.h ('k') | chrome/browser/policy/async_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698