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

Side by Side Diff: remoting/host/policy_watcher.h

Issue 2847853003: Remove policy watching from It2MeHost. (Closed)
Patch Set: Add dep. Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 REMOTING_HOST_POLICY_WATCHER_H_ 5 #ifndef REMOTING_HOST_POLICY_WATCHER_H_
6 #define REMOTING_HOST_POLICY_WATCHER_H_ 6 #define REMOTING_HOST_POLICY_WATCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // security risk of running with incorrectly formulated policies (by either 52 // security risk of running with incorrectly formulated policies (by either
53 // shutting down or locking down the host). 53 // shutting down or locking down the host).
54 // After calling |policy_error_callback| PolicyWatcher will continue watching 54 // After calling |policy_error_callback| PolicyWatcher will continue watching
55 // for policy changes and will call |policy_updated_callback| when the error 55 // for policy changes and will call |policy_updated_callback| when the error
56 // is recovered from and may call |policy_error_callback| when new errors are 56 // is recovered from and may call |policy_error_callback| when new errors are
57 // found. 57 // found.
58 virtual void StartWatching( 58 virtual void StartWatching(
59 const PolicyUpdatedCallback& policy_updated_callback, 59 const PolicyUpdatedCallback& policy_updated_callback,
60 const PolicyErrorCallback& policy_error_callback); 60 const PolicyErrorCallback& policy_error_callback);
61 61
62 // Return the current policies.
63 std::unique_ptr<base::DictionaryValue> GetCurrentPolicies();
64
65 // Return the default policies.
66 static std::unique_ptr<base::DictionaryValue> GetDefaultPolicies();
67
62 // Specify a |policy_service| to borrow (on Chrome OS, from the browser 68 // Specify a |policy_service| to borrow (on Chrome OS, from the browser
63 // process) or specify nullptr to internally construct and use a new 69 // process) or specify nullptr to internally construct and use a new
64 // PolicyService (on other OS-es). PolicyWatcher must be used on the thread on 70 // PolicyService (on other OS-es). PolicyWatcher must be used on the thread on
65 // which it is created. |policy_service| is called on the same thread. 71 // which it is created. |policy_service| is called on the same thread.
66 // 72 //
67 // When |policy_service| is null, then |file_task_runner| is used for reading 73 // When |policy_service| is null, then |file_task_runner| is used for reading
68 // the policy from files / registry / preferences (which are blocking 74 // the policy from files / registry / preferences (which are blocking
69 // operations). |file_task_runner| should be of TYPE_IO type. 75 // operations). |file_task_runner| should be of TYPE_IO type.
70 // 76 //
71 // When |policy_service| is specified then |file_task_runner| argument is 77 // When |policy_service| is specified then |file_task_runner| argument is
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 std::unique_ptr<policy::SchemaRegistry> owned_schema_registry_; 156 std::unique_ptr<policy::SchemaRegistry> owned_schema_registry_;
151 std::unique_ptr<policy::ConfigurationPolicyProvider> owned_policy_provider_; 157 std::unique_ptr<policy::ConfigurationPolicyProvider> owned_policy_provider_;
152 std::unique_ptr<policy::PolicyService> owned_policy_service_; 158 std::unique_ptr<policy::PolicyService> owned_policy_service_;
153 159
154 DISALLOW_COPY_AND_ASSIGN(PolicyWatcher); 160 DISALLOW_COPY_AND_ASSIGN(PolicyWatcher);
155 }; 161 };
156 162
157 } // namespace remoting 163 } // namespace remoting
158 164
159 #endif // REMOTING_HOST_POLICY_WATCHER_H_ 165 #endif // REMOTING_HOST_POLICY_WATCHER_H_
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_native_messaging_host_unittest.cc ('k') | remoting/host/policy_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698