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

Side by Side Diff: chrome/browser/policy/async_policy_loader.h

Issue 22493010: policy: load JSON schema into domain descriptor at start time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments and clean up includes Created 7 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 (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 #ifndef CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_ 5 #ifndef CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_
6 #define CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_ 6 #define CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 private: 83 private:
84 // Allow AsyncPolicyProvider to call Init(). 84 // Allow AsyncPolicyProvider to call Init().
85 friend class AsyncPolicyProvider; 85 friend class AsyncPolicyProvider;
86 86
87 typedef base::Callback<void(scoped_ptr<PolicyBundle>)> UpdateCallback; 87 typedef base::Callback<void(scoped_ptr<PolicyBundle>)> UpdateCallback;
88 88
89 // Used by the AsyncPolicyProvider to do the initial Load(). The first load 89 // Used by the AsyncPolicyProvider to do the initial Load(). The first load
90 // is also used to initialize |last_modification_time_|. 90 // is also used to initialize |last_modification_time_|.
91 scoped_ptr<PolicyBundle> InitialLoad(); 91 scoped_ptr<PolicyBundle> InitialLoad();
92 92
93 // Registers a policy domain without triggering a policy load.
94 void InitialRegisterPolicyDomain(
95 scoped_refptr<const PolicyDomainDescriptor> descriptor);
96
93 // Used by the AsyncPolicyProvider to install the |update_callback_|. 97 // Used by the AsyncPolicyProvider to install the |update_callback_|.
94 // Invoked on the background thread. 98 // Invoked on the background thread.
95 void Init(const UpdateCallback& update_callback); 99 void Init(const UpdateCallback& update_callback);
96 100
97 // Cancels any pending periodic reload and posts one |delay| time units from 101 // Cancels any pending periodic reload and posts one |delay| time units from
98 // now. 102 // now.
99 void ScheduleNextReload(base::TimeDelta delay); 103 void ScheduleNextReload(base::TimeDelta delay);
100 104
101 // Checks if the underlying files haven't changed recently, by checking the 105 // Checks if the underlying files haven't changed recently, by checking the
102 // LastModificationTime(). |delay| is updated with a suggested time to wait 106 // LastModificationTime(). |delay| is updated with a suggested time to wait
(...skipping 20 matching lines...) Expand all
123 127
124 // A map of the currently registered domains and their descriptors. 128 // A map of the currently registered domains and their descriptors.
125 DescriptorMap descriptor_map_; 129 DescriptorMap descriptor_map_;
126 130
127 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyLoader); 131 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyLoader);
128 }; 132 };
129 133
130 } // namespace policy 134 } // namespace policy
131 135
132 #endif // CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_ 136 #endif // CHROME_BROWSER_POLICY_ASYNC_POLICY_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/async_policy_loader.cc » ('j') | chrome/browser/policy/browser_policy_connector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698