1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 from telemetry.core import util
9 BASE_PROFILE_TYPES = ['clean', 'default']
11 PROFILE_TYPE_MAPPING = {
12 'typical_user': 'chrome/test/data/extensions/profiles/content_scripts1',
13 'power_user': 'chrome/test/data/extensions/profiles/extension_webrequest',
16 def GetProfileTypes():
17 """Returns a list of all command line options that can be specified for
19 return BASE_PROFILE_TYPES + PROFILE_TYPE_MAPPING.keys()
21 def GetProfileDir(profile_type):
22 """Given a |profile_type| (as returned by GetProfileTypes()), return the
23 directory to use for that profile or None if the profile doesn't need a
24 profile directory (e.g. using the browser default profile).
26 if profile_type in BASE_PROFILE_TYPES:
30 util.GetChromiumSrcDir(), *PROFILE_TYPE_MAPPING[profile_type].split('/'))
32 assert os.path.exists(path)