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

Unified Diff: remoting/host/policy_watcher.h

Issue 2764333003: Support PolicyWatcher with custom loader for testing (Closed)
Patch Set: Created 3 years, 9 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 e3f54f6916bfd80c6a5dbdfc74722198e76472a8..5523b8478969d01b7c5d80c52896d0b5c0459d3f 100644
--- a/remoting/host/policy_watcher.h
+++ b/remoting/host/policy_watcher.h
@@ -78,6 +78,14 @@ class PolicyWatcher : public policy::PolicyService::Observer,
policy::PolicyService* policy_service,
const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner);
+ // Creates a PolicyWatcher from the given loader instead of loading the policy
+ // from the default location.
+ //
+ // This can be used with FakeAsyncPolicyLoader to test policy handling of
+ // other components.
+ static std::unique_ptr<PolicyWatcher> CreateFromPolicyLoaderForTesting(
+ std::unique_ptr<policy::AsyncPolicyLoader> async_policy_loader);
+
private:
friend class PolicyWatcherTest;
« 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