OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Downloads items from the Chromium continuous archive.""" | 5 """Downloads items from the Chromium continuous archive.""" |
6 | 6 |
7 import os | 7 import os |
8 import platform | 8 import platform |
9 import urllib | 9 import urllib |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 """Returns the name for this platform on the archive site.""" | 72 """Returns the name for this platform on the archive site.""" |
73 if util.IsWindows(): | 73 if util.IsWindows(): |
74 return 'Win' | 74 return 'Win' |
75 elif util.IsMac(): | 75 elif util.IsMac(): |
76 return 'Mac' | 76 return 'Mac' |
77 elif util.IsLinux(): | 77 elif util.IsLinux(): |
78 if platform.architecture()[0] == '64bit': | 78 if platform.architecture()[0] == '64bit': |
79 return 'Linux_x64' | 79 return 'Linux_x64' |
80 else: | 80 else: |
81 return 'Linux' | 81 return 'Linux' |
| 82 |
| 83 def GetLatestSnapshotVersion(): |
| 84 """Returns the latest revision of snapshot build.""" |
| 85 return GetLatestRevision(GetSnapshotDownloadSite()) |
| 86 |
| 87 def GetSnapshotDownloadSite(): |
| 88 """Returns the site to download snapshot build according to the platform. |
| 89 |
| 90 For Linux 32-bit, it is chromium snapshot build. |
| 91 For other platform, it is blink snapshot build. |
| 92 Because there is no linux32 blink snapshot build. |
| 93 """ |
| 94 if _GetDownloadPlatform() == 'Linux': |
| 95 return Site.CHROMIUM_SNAPSHOT |
| 96 else: |
| 97 return Site.BLINK_SNAPSHOT |
OLD | NEW |