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

Unified Diff: remoting/webapp/build-webapp.py

Issue 10933138: Add a preliminary Python API for retrieving Google API keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« google_apis/google_api_keys.py ('K') | « google_apis/google_api_keys.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/build-webapp.py
diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py
index 9b8599adb6cc7bf530132fe1809772c2f9176a03..0345534ee0a9dec28e3d429de91debab5469c71b 100755
--- a/remoting/webapp/build-webapp.py
+++ b/remoting/webapp/build-webapp.py
@@ -23,6 +23,13 @@ import sys
import time
import zipfile
+# Munge include path to find the google_api_keys API, and import it.
+if __name__ == '__main__':
+ sys.path.append(
+ os.path.abspath(os.path.join(sys.path[0], '../../google_apis')))
+import google_api_keys
+
+
def findAndReplace(filepath, findString, replaceString):
"""Does a search and replace on the contents of a file."""
oldFilename = os.path.basename(filepath) + '.old'
@@ -184,10 +191,9 @@ def buildWebApp(buildtype, version, mimetype, destination, zip_path, plugin,
oauth2RedirectUrlJson)
# Set the correct API keys.
- if (buildtype == 'Official'):
- apiClientId = ('440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.' +
- 'apps.googleusercontent.com')
- apiClientSecret = 'Bgur6DFiOMM1h8x-AQpuTQlK'
+ apiClientId = google_api_keys.GetClientID('REMOTING')
+ apiClientSecret = google_api_keys.GetClientSecret('REMOTING')
+ if (apiClientId and apiClientSecret):
oauth2UseOfficialClientId = 'true';
else:
apiClientId = ('440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.' +
« google_apis/google_api_keys.py ('K') | « google_apis/google_api_keys.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698