2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 """Embeds Chrome user data files in C++ code."""
15 sys
.path
.insert(0, os
.path
.join(chrome_paths
.GetSrc(), 'build', 'util'))
20 parser
= optparse
.OptionParser()
21 parser
.add_option('', '--version-file')
23 '', '--directory', type='string', default
='.',
24 help='Path to directory where the cc/h file should be created')
25 options
, args
= parser
.parse_args()
27 version
= open(options
.version_file
, 'r').read().strip()
28 revision
= lastchange
.FetchVersionInfo(None).revision
30 version
+= '.' + revision
.strip()
33 'kChromeDriverVersion': version
35 cpp_source
.WriteSource('version',
36 'chrome/test/chromedriver',
37 options
.directory
, global_string_map
)
40 if __name__
== '__main__':