The Chromium and Google Chrome builds of the chromoting webapp use different

keys to access Google services.

BUG=112889

Review URL: https://chromiumcodereview.appspot.com/9343001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120782 0039d316-1c4b-4281-b951-d872f2087c98
parent 5233b4a8
...@@ -191,6 +191,22 @@ def buildWebApp(buildtype, mimetype, destination, zip_path, plugin, files, ...@@ -191,6 +191,22 @@ def buildWebApp(buildtype, mimetype, destination, zip_path, plugin, files,
"OAUTH2_REDIRECT_URL", "OAUTH2_REDIRECT_URL",
oauth2RedirectUrlJson) oauth2RedirectUrlJson)
# Set the correct API keys.
if (buildtype == 'Official'):
apiClientId = ('440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.' +
'apps.googleusercontent.com')
apiClientSecret = 'Bgur6DFiOMM1h8x-AQpuTQlK'
else:
apiClientId = ('440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.' +
'apps.googleusercontent.com')
apiClientSecret = 'W2ieEsG-R1gIA4MMurGrgMc_'
findAndReplace(os.path.join(destination, 'plugin_settings.js'),
"'API_CLIENT_ID'",
"'" + apiClientId + "'")
findAndReplace(os.path.join(destination, 'plugin_settings.js'),
"'API_CLIENT_SECRET'",
"'" + apiClientSecret + "'")
# Make the zipfile. # Make the zipfile.
createZip(zip_path, destination) createZip(zip_path, destination)
......
...@@ -34,12 +34,6 @@ remoting.OAuth2.prototype.KEY_EMAIL_ = 'remoting-email'; ...@@ -34,12 +34,6 @@ remoting.OAuth2.prototype.KEY_EMAIL_ = 'remoting-email';
// Constants for parameters used in retrieving the OAuth2 credentials. // Constants for parameters used in retrieving the OAuth2 credentials.
/** @private */ /** @private */
remoting.OAuth2.prototype.CLIENT_ID_ =
'440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.' +
'apps.googleusercontent.com';
/** @private */
remoting.OAuth2.prototype.CLIENT_SECRET_ = 'W2ieEsG-R1gIA4MMurGrgMc_';
/** @private */
remoting.OAuth2.prototype.SCOPE_ = remoting.OAuth2.prototype.SCOPE_ =
'https://www.googleapis.com/auth/chromoting ' + 'https://www.googleapis.com/auth/chromoting ' +
'https://www.googleapis.com/auth/googletalk ' + 'https://www.googleapis.com/auth/googletalk ' +
......
...@@ -19,3 +19,9 @@ remoting.PLUGIN_MIMETYPE = 'HOST_PLUGIN_MIMETYPE'; ...@@ -19,3 +19,9 @@ remoting.PLUGIN_MIMETYPE = 'HOST_PLUGIN_MIMETYPE';
* @private * @private
*/ */
remoting.OAuth2.prototype.REDIRECT_URI_ = 'OAUTH2_REDIRECT_URL'; remoting.OAuth2.prototype.REDIRECT_URI_ = 'OAUTH2_REDIRECT_URL';
// Constants for parameters used in retrieving the OAuth2 credentials.
/** @private */
remoting.OAuth2.prototype.CLIENT_ID_ = 'API_CLIENT_ID';
/** @private */
remoting.OAuth2.prototype.CLIENT_SECRET_ = 'API_CLIENT_SECRET';
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment