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

Unified Diff: remoting/host/client_session.cc

Issue 15927033: Add host-side rate-limiting to desktop resize events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/resizing_host_observer.h » ('j') | remoting/host/resizing_host_observer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 2f17ce854442ff00094337bff4ef41cca2e0ac7e..62aa056a455c6a72c7528d39104076764d584382 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -31,6 +31,10 @@
// Default DPI to assume for old clients that use notifyClientDimensions.
const int kDefaultDPI = 96;
+// All DesktopEnvironment implementations rate-limit desktop resize requests,
+// so this Capability is added automatically.
+const char kRateLimitResizeRequests[] = "rateLimitResizeRequests";
+
namespace remoting {
ClientSession::ClientSession(
@@ -211,6 +215,7 @@ void ClientSession::OnConnectionAuthenticated(
}
host_capabilities_ = desktop_environment_->GetCapabilities();
+ host_capabilities_ = host_capabilities_ + " " + kRateLimitResizeRequests;
Jamie 2013/06/04 01:27:49 Is this an acceptable way of getting the capabilit
alexeypa (please no reviews) 2013/06/04 17:07:37 No, I don't think we should do it this way. I thin
Jamie 2013/06/04 21:18:03 Done. However, see my comments below.
// Ignore protocol::Capabilities messages from the client if it does not
// support any capabilities.
« no previous file with comments | « no previous file | remoting/host/resizing_host_observer.h » ('j') | remoting/host/resizing_host_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698