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

Side by Side Diff: build/android/gyp/java_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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2015 The Chromium Authors. All rights reserved. 3 # Copyright 2015 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Generates a Java file with API keys. 7 # Generates a Java file with API keys.
8 8
9 import argparse 9 import argparse
10 import os 10 import os
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 parser.add_argument("--out", help="Path for java output.") 95 parser.add_argument("--out", help="Path for java output.")
96 parser.add_argument("--srcjar", help="Path for srcjar output.") 96 parser.add_argument("--srcjar", help="Path for srcjar output.")
97 options = parser.parse_args(argv) 97 options = parser.parse_args(argv)
98 if not options.out and not options.srcjar: 98 if not options.out and not options.srcjar:
99 parser.print_help() 99 parser.print_help()
100 sys.exit(-1) 100 sys.exit(-1)
101 101
102 values = {} 102 values = {}
103 values['GOOGLE_API_KEY'] = google_api_keys.GetAPIKey() 103 values['GOOGLE_API_KEY'] = google_api_keys.GetAPIKey()
104 values['GOOGLE_API_KEY_REMOTING'] = google_api_keys.GetAPIKeyRemoting() 104 values['GOOGLE_API_KEY_REMOTING'] = google_api_keys.GetAPIKeyRemoting()
105 values['GOOGLE_API_KEY_PHYSICAL_WEB_TEST'] = (google_api_keys.
106 GetAPIKeyPhysicalWebTest())
105 values['GOOGLE_CLIENT_ID_MAIN'] = google_api_keys.GetClientID('MAIN') 107 values['GOOGLE_CLIENT_ID_MAIN'] = google_api_keys.GetClientID('MAIN')
106 values['GOOGLE_CLIENT_SECRET_MAIN'] = google_api_keys.GetClientSecret('MAIN') 108 values['GOOGLE_CLIENT_SECRET_MAIN'] = google_api_keys.GetClientSecret('MAIN')
107 values['GOOGLE_CLIENT_ID_CLOUD_PRINT'] = google_api_keys.GetClientID( 109 values['GOOGLE_CLIENT_ID_CLOUD_PRINT'] = google_api_keys.GetClientID(
108 'CLOUD_PRINT') 110 'CLOUD_PRINT')
109 values['GOOGLE_CLIENT_SECRET_CLOUD_PRINT'] = google_api_keys.GetClientSecret( 111 values['GOOGLE_CLIENT_SECRET_CLOUD_PRINT'] = google_api_keys.GetClientSecret(
110 'CLOUD_PRINT') 112 'CLOUD_PRINT')
111 values['GOOGLE_CLIENT_ID_REMOTING'] = google_api_keys.GetClientID('REMOTING') 113 values['GOOGLE_CLIENT_ID_REMOTING'] = google_api_keys.GetClientID('REMOTING')
112 values['GOOGLE_CLIENT_SECRET_REMOTING'] = google_api_keys.GetClientSecret( 114 values['GOOGLE_CLIENT_SECRET_REMOTING'] = google_api_keys.GetClientSecret(
113 'REMOTING') 115 'REMOTING')
114 values['GOOGLE_CLIENT_ID_REMOTING_HOST'] = google_api_keys.GetClientID( 116 values['GOOGLE_CLIENT_ID_REMOTING_HOST'] = google_api_keys.GetClientID(
115 'REMOTING_HOST') 117 'REMOTING_HOST')
116 values['GOOGLE_CLIENT_SECRET_REMOTING_HOST'] = (google_api_keys. 118 values['GOOGLE_CLIENT_SECRET_REMOTING_HOST'] = (google_api_keys.
117 GetClientSecret('REMOTING_HOST')) 119 GetClientSecret('REMOTING_HOST'))
118 values['GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API'] = (google_api_keys. 120 values['GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API'] = (google_api_keys.
119 GetClientID('REMOTING_IDENTITY_API')) 121 GetClientID('REMOTING_IDENTITY_API'))
120 122
121 if options.out: 123 if options.out:
122 _DoWriteJavaOutput(options.out, values) 124 _DoWriteJavaOutput(options.out, values)
123 if options.srcjar: 125 if options.srcjar:
124 _DoWriteJarOutput(options.srcjar, values) 126 _DoWriteJarOutput(options.srcjar, values)
125 127
126 128
127 if __name__ == '__main__': 129 if __name__ == '__main__':
128 _DoMain(sys.argv[1:]) 130 _DoMain(sys.argv[1:])
129 131
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698