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

Side by Side Diff: google_apis/google_api_keys.py

Issue 1415183008: Use new Physical Web service on Google infrastructure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClient.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Python API for retrieving API keys. 6 """Python API for retrieving API keys.
7 7
8 Note that this does not have the exact same semantics as the C++ API 8 Note that this does not have the exact same semantics as the C++ API
9 in google_api_keys.h, since it does not have access to gyp variables 9 in google_api_keys.h, since it does not have access to gyp variables
10 or preprocessor defines. 10 or preprocessor defines.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 if token: 62 if token:
63 return token 63 return token
64 else: 64 else:
65 return DUMMY_TOKEN 65 return DUMMY_TOKEN
66 66
67 67
68 def GetAPIKey(): 68 def GetAPIKey():
69 """Returns the simple API key.""" 69 """Returns the simple API key."""
70 return _GetToken('GOOGLE_API_KEY') 70 return _GetToken('GOOGLE_API_KEY')
71 71
72 def GetAPIKeyPhysicalWebTest():
73 """Returns the API key to test Physical Web service."""
74 return _GetToken('GOOGLE_API_KEY_PHYSICAL_WEB_TEST')
Roger Tawa OOO till Jul 10th 2015/11/06 13:45:55 There should be two blank lines between functions.
dvh 2015/11/06 19:27:46 Done.
72 75
73 def GetAPIKeyRemoting(): 76 def GetAPIKeyRemoting():
74 """Returns the simple API key.""" 77 """Returns the simple API key."""
75 return _GetToken('GOOGLE_API_KEY_REMOTING') 78 return _GetToken('GOOGLE_API_KEY_REMOTING')
76 79
77 80
78 def GetClientID(client_name): 81 def GetClientID(client_name):
79 """Returns the OAuth 2.0 client ID for the client of the given name.""" 82 """Returns the OAuth 2.0 client ID for the client of the given name."""
80 return _GetToken('GOOGLE_CLIENT_ID_%s' % client_name) 83 return _GetToken('GOOGLE_CLIENT_ID_%s' % client_name)
81 84
(...skipping 10 matching lines...) Expand all
92 print 'GOOGLE_CLIENT_SECRET_MAIN=%s' % GetClientSecret('MAIN') 95 print 'GOOGLE_CLIENT_SECRET_MAIN=%s' % GetClientSecret('MAIN')
93 print 'GOOGLE_CLIENT_ID_CLOUD_PRINT=%s' % GetClientID('CLOUD_PRINT') 96 print 'GOOGLE_CLIENT_ID_CLOUD_PRINT=%s' % GetClientID('CLOUD_PRINT')
94 print 'GOOGLE_CLIENT_SECRET_CLOUD_PRINT=%s' % GetClientSecret('CLOUD_PRINT') 97 print 'GOOGLE_CLIENT_SECRET_CLOUD_PRINT=%s' % GetClientSecret('CLOUD_PRINT')
95 print 'GOOGLE_CLIENT_ID_REMOTING=%s' % GetClientID('REMOTING') 98 print 'GOOGLE_CLIENT_ID_REMOTING=%s' % GetClientID('REMOTING')
96 print 'GOOGLE_CLIENT_SECRET_REMOTING=%s' % GetClientSecret('REMOTING') 99 print 'GOOGLE_CLIENT_SECRET_REMOTING=%s' % GetClientSecret('REMOTING')
97 print 'GOOGLE_CLIENT_ID_REMOTING_HOST=%s' % GetClientID('REMOTING_HOST') 100 print 'GOOGLE_CLIENT_ID_REMOTING_HOST=%s' % GetClientID('REMOTING_HOST')
98 print 'GOOGLE_CLIENT_SECRET_REMOTING_HOST=%s' % GetClientSecret( 101 print 'GOOGLE_CLIENT_SECRET_REMOTING_HOST=%s' % GetClientSecret(
99 'REMOTING_HOST') 102 'REMOTING_HOST')
100 print 'GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API=%s' %GetClientID( 103 print 'GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API=%s' %GetClientID(
101 'REMOTING_IDENTITY_API') 104 'REMOTING_IDENTITY_API')
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PwsClient.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698