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

Unified Diff: remoting/host/it2me/it2me_host.cc

Issue 722743003: Reporting of policy errors via host-offline-reason: part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: remoting/host/it2me/it2me_host.cc
diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc
index b9a17f8c9431b159fddbcd15a586eb438b315995..574df0daa24ca670a67ed03c6590de95846666c4 100644
--- a/remoting/host/it2me/it2me_host.cc
+++ b/remoting/host/it2me/it2me_host.cc
@@ -70,7 +70,8 @@ void It2MeHost::Connect() {
policy_watcher_.reset(
policy_hack::PolicyWatcher::Create(host_context_->network_task_runner()));
policy_watcher_->StartWatching(
- base::Bind(&It2MeHost::OnPolicyUpdate, this));
+ base::Bind(&It2MeHost::OnPolicyUpdate, this),
+ base::Bind(&It2MeHost::OnPolicyError, this));
// Switch to the network thread to start the actual connection.
host_context_->network_task_runner()->PostTask(
@@ -332,6 +333,14 @@ void It2MeHost::OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies) {
}
}
+void It2MeHost::OnPolicyError() {
Lambros 2014/11/13 00:30:26 optional: NOTIMPLEMENTED()
Łukasz Anforowicz 2014/11/13 17:48:08 Done. I hope that the default policy (4 -- [defau
+ // TODO(lukasza): figure out what to do here...
Lambros 2014/11/13 00:30:26 Maybe keep this simple and just say "Report the po
Łukasz Anforowicz 2014/11/13 17:48:08 Done.
+ // we possibly need equivalent of
+ // void ShutdownHost(HostExitCodes exit_code);
+ // from me2me host (ideally this would be in some kind
+ // of shared code to avoid duplication)
+}
+
void It2MeHost::UpdateNatPolicy(bool nat_traversal_enabled) {
DCHECK(host_context_->network_task_runner()->BelongsToCurrentThread());

Powered by Google App Engine
This is Rietveld 408576698