Merge pull request #611 from webrtc/KaptenJansson-patch-1

Remove stats
diff --git a/.gitignore b/.gitignore
index fbe43b9..4af7458 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,6 @@
 firefox*
 node_modules
 out
-rtstats.js
 secrets.json
 source-context*.json
 temp/*
diff --git a/build/build_app_engine_package.py b/build/build_app_engine_package.py
index 05b75c8..570bf4a 100644
--- a/build/build_app_engine_package.py
+++ b/build/build_app_engine_package.py
@@ -95,9 +95,9 @@
           shutil.copy(os.path.join(dirpath, name), dest_path)
     elif dirpath.endswith('js'):
       for name in files:
-        # loopback.js and rtstats.js are not compiled by Closure
+        # loopback.js is not compiled by Closure
         # and need to be copied separately.
-        if name in ['loopback.js', 'rtstats.js']:
+        if name in ['loopback.js']:
           dest_js_path = os.path.join(dest_path, 'js')
           if not os.path.exists(dest_js_path):
               os.makedirs(dest_js_path)
diff --git a/src/app_engine/app.yaml b/src/app_engine/app.yaml
index 660cc19..8515f85 100644
--- a/src/app_engine/app.yaml
+++ b/src/app_engine/app.yaml
@@ -53,4 +53,3 @@
   # Use appcfg.py --env_variable=ICE_SERVER_API_KEY:KEY \
   # in order to replace variables when deploying.
   ICE_SERVER_API_KEY: none
-  WITH_RTSTATS: none
diff --git a/src/app_engine/apprtc.py b/src/app_engine/apprtc.py
index d86039d..e845f49 100755
--- a/src/app_engine/apprtc.py
+++ b/src/app_engine/apprtc.py
@@ -252,13 +252,6 @@
   else:
     include_loopback_js = ''
 
-  include_rtstats_js = ''
-  if str(os.environ.get('WITH_RTSTATS')) != 'none' or \
-    (os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/') and \
-     app_identity.get_application_id() == 'apprtc'):
-    include_rtstats_js = \
-        '<script src="/js/rtstats.js"></script><script src="/pako/pako.min.js"></script>'
-
   # TODO(tkchin): We want to provide a ICE request url on the initial get,
   # but we don't provide client_id until a join. For now just generate
   # a random id, but we should make this better.
@@ -294,7 +287,6 @@
     'ice_server_url': ice_server_url,
     'ice_server_transports': ice_server_transports,
     'include_loopback_js' : include_loopback_js,
-    'include_rtstats_js' : include_rtstats_js,
     'wss_url': wss_url,
     'wss_post_url': wss_post_url,
     'bypass_join_confirmation': json.dumps(bypass_join_confirmation),
diff --git a/src/web_app/html/index_template.html b/src/web_app/html/index_template.html
index 534cc43..0fc3730 100644
--- a/src/web_app/html/index_template.html
+++ b/src/web_app/html/index_template.html
@@ -121,7 +121,6 @@
 {% if not chromeapp %}
   {{ include_loopback_js }}
 {% endif %}
-{{ include_rtstats_js }}
 
   <script src="/js/apprtc.debug.js"></script>