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

Unified Diff: remoting/client/plugin/chromoting_scriptable_object.cc

Issue 7065036: Add basic versioning check to Chromoting's plugin/JS code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 9 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 | « remoting/client/plugin/chromoting_scriptable_object.h ('k') | remoting/webapp/me2mom/remoting_session.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_scriptable_object.cc
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
index 106141fbcb59beceb57ad3f654e65e2f9ce726b4..e998ff61bf7110f329d78cb93b4200e28e6cc6df 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -18,6 +18,8 @@ namespace remoting {
namespace {
+const char kApiVersionAttribute[] = "apiVersion";
+const char kApiMinVersionAttribute[] = "apiMinVersion";
const char kConnectionInfoUpdate[] = "connectionInfoUpdate";
const char kDebugInfo[] = "debugInfo";
const char kDesktopHeight[] = "desktopHeight";
@@ -48,6 +50,14 @@ void ChromotingScriptableObject::Init() {
// Property addition order should match the interface description at the
// top of chromoting_scriptable_object.h.
+ // Plugin API version.
+ // This should be incremented whenever the API interface changes.
+ AddAttribute(kApiVersionAttribute, Var(1));
+
+ // This should be updated whenever we remove support for an older version
+ // of the API.
+ AddAttribute(kApiMinVersionAttribute, Var(1));
+
// Connection status.
AddAttribute(kStatusAttribute, Var(STATUS_UNKNOWN));
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.h ('k') | remoting/webapp/me2mom/remoting_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698