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

Side by Side Diff: components/policy/core/common/async_policy_provider.h

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browsertest and removed unnecessary string for default values. 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 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 #ifndef COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_PROVIDER_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_PROVIDER_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_PROVIDER_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_PROVIDER_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 22 matching lines...) Expand all
33 // therefore it needs the |registry| at construction time. The same |registry| 33 // therefore it needs the |registry| at construction time. The same |registry|
34 // should be passed later to Init(). 34 // should be passed later to Init().
35 AsyncPolicyProvider(SchemaRegistry* registry, 35 AsyncPolicyProvider(SchemaRegistry* registry,
36 scoped_ptr<AsyncPolicyLoader> loader); 36 scoped_ptr<AsyncPolicyLoader> loader);
37 ~AsyncPolicyProvider() override; 37 ~AsyncPolicyProvider() override;
38 38
39 // ConfigurationPolicyProvider implementation. 39 // ConfigurationPolicyProvider implementation.
40 void Init(SchemaRegistry* registry) override; 40 void Init(SchemaRegistry* registry) override;
41 void Shutdown() override; 41 void Shutdown() override;
42 void RefreshPolicies() override; 42 void RefreshPolicies() override;
43 // ConfigurationPolicyProvider::source() now provided by internal loader.
Thiemo Nagel 2015/09/01 17:40:36 Remove.
fhorschig 2015/09/04 06:53:54 Done.
44 PolicySource source() const override;
43 45
44 private: 46 private:
45 // Helper for RefreshPolicies(). 47 // Helper for RefreshPolicies().
46 void ReloadAfterRefreshSync(); 48 void ReloadAfterRefreshSync();
47 49
48 // Invoked with the latest bundle loaded by the |loader_|. 50 // Invoked with the latest bundle loaded by the |loader_|.
49 void OnLoaderReloaded(scoped_ptr<PolicyBundle> bundle); 51 void OnLoaderReloaded(scoped_ptr<PolicyBundle> bundle);
50 52
51 // Callback passed to the loader that it uses to pass back the current policy 53 // Callback passed to the loader that it uses to pass back the current policy
52 // bundle to the provider. This is invoked on the background thread and 54 // bundle to the provider. This is invoked on the background thread and
(...skipping 15 matching lines...) Expand all
68 // Used to get a WeakPtr to |this| for the update callback given to the 70 // Used to get a WeakPtr to |this| for the update callback given to the
69 // loader. 71 // loader.
70 base::WeakPtrFactory<AsyncPolicyProvider> weak_factory_; 72 base::WeakPtrFactory<AsyncPolicyProvider> weak_factory_;
71 73
72 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyProvider); 74 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyProvider);
73 }; 75 };
74 76
75 } // namespace policy 77 } // namespace policy
76 78
77 #endif // COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_PROVIDER_H_ 79 #endif // COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698