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.
4
5"""The linux specific host and platform implementation module."""
6
7import os
8
9import cr
10
11
12class LinuxHost(cr.Host):
13  """The implementation of Host for linux."""
14
15  ACTIVE = cr.Config.From(
16      GOOGLE_CODE='/usr/local/google/code',
17  )
18
19  def __init__(self):
20    super(LinuxHost, self).__init__()
21
22  def Matches(self):
23    return cr.Platform.System() == 'Linux'
24
25
26class LinuxPlatform(cr.Platform):
27  """The implementation of Platform for the linux target."""
28
29  ACTIVE = cr.Config.From(
30      CR_BINARY=os.path.join('{CR_BUILD_DIR}', '{CR_BUILD_TARGET}'),
31      CHROME_DEVEL_SANDBOX='/usr/local/sbin/chrome-devel-sandbox',
32  )
33
34  @property
35  def enabled(self):
36    return cr.Platform.System() == 'Linux'
37
38  @property
39  def priority(self):
40    return 2
41
42  @property
43  def paths(self):
44    return ['{GOMA_DIR}']
45