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

Unified Diff: remoting/host/policy_watcher.h

Issue 891053003: Reporting a policy error after detecting mistyped policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/policy_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/policy_watcher.h
diff --git a/remoting/host/policy_watcher.h b/remoting/host/policy_watcher.h
index b4d6dda7cbec187e0ca44a5d657d5507d4cfab6c..6b690ab2bc62d4a72453cf8fe4ed9caceb295082 100644
--- a/remoting/host/policy_watcher.h
+++ b/remoting/host/policy_watcher.h
@@ -20,6 +20,7 @@ class SingleThreadTaskRunner;
namespace policy {
class AsyncPolicyLoader;
class ConfigurationPolicyProvider;
+class Schema;
class SchemaRegistry;
} // namespace policy
@@ -33,12 +34,6 @@ class PolicyWatcher : public policy::PolicyService::Observer,
typedef base::Callback<void(scoped_ptr<base::DictionaryValue>)>
PolicyUpdatedCallback;
- // TODO(lukasza): PolicyErrorCallback never gets called by PolicyWatcher.
- // Need to either 1) remove error-handling from PolicyWatcher or 2) add
- // error-handling around PolicyService 2a) Add policy name/type validation via
- // policy::Schema::Normalize. 2b) Consider exposing parsing errors from
- // policy::ConfigDirPolicyLoader.
-
// Called after detecting malformed policies.
typedef base::Callback<void()> PolicyErrorCallback;
@@ -89,15 +84,12 @@ class PolicyWatcher : public policy::PolicyService::Observer,
// relevant policies.
void UpdatePolicies(const base::DictionaryValue* new_policy);
+ // Gets Chromoting schema stored inside |owned_schema_registry_|.
+ const policy::Schema* GetPolicySchema() const;
+
// Signals policy error to the registered |PolicyErrorCallback|.
void SignalPolicyError();
- // Called whenever a transient error occurs during reading of policy files.
- // This will increment a counter, and will trigger a call to
- // SignalPolicyError() only after a threshold count is reached.
- // The counter is reset whenever policy has been successfully read.
- void SignalTransientPolicyError();
-
// |policy_service_task_runner| is the task runner where it is safe
// to call |policy_service_| methods and where we expect to get callbacks
// from |policy_service_|.
@@ -123,11 +115,9 @@ class PolicyWatcher : public policy::PolicyService::Observer,
PolicyUpdatedCallback policy_updated_callback_;
PolicyErrorCallback policy_error_callback_;
- int transient_policy_error_retry_counter_;
scoped_ptr<base::DictionaryValue> old_policies_;
scoped_ptr<base::DictionaryValue> default_values_;
- scoped_ptr<base::DictionaryValue> bad_type_values_;
policy::PolicyService* policy_service_;
« no previous file with comments | « no previous file | remoting/host/policy_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698