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

Unified Diff: native_client_sdk/src/build_tools/sdk_tools/sdk_update.py

Issue 8889029: Merged in other half of NaCl SDK's r1387 change to update_manifest.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/sdk_tools/update_manifest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/sdk_tools/sdk_update.py
diff --git a/native_client_sdk/src/build_tools/sdk_tools/sdk_update.py b/native_client_sdk/src/build_tools/sdk_tools/sdk_update.py
index 297de9cecf13f458ccac93b1aa38a0f407cae3ea..c57a14c1152d2ba2eaec4d9a517677dc7bbedaae 100755
--- a/native_client_sdk/src/build_tools/sdk_tools/sdk_update.py
+++ b/native_client_sdk/src/build_tools/sdk_tools/sdk_update.py
@@ -27,7 +27,7 @@ import urlparse
# Bump the MINOR_REV every time you check this file in.
MAJOR_REV = 1
-MINOR_REV = 12
+MINOR_REV = 13
GLOBAL_HELP = '''Usage: naclsdk [options] command [command_options]
@@ -476,6 +476,18 @@ class Archive(dict):
self['size'] = size
self['checksum'] = {'sha1': sha1}
+ def GetUrl(self):
+ '''Returns the URL of this Archive'''
+ return self['url']
+
+ def GetSize(self):
+ '''Returns the size of this archive, in bytes'''
+ return int(self['size'])
+
+ def GetChecksum(self, type='sha1'):
+ '''Returns a given cryptographic checksum of the archive'''
+ return self['checksum'][type]
+
class Bundle(dict):
''' A placeholder for sdk bundle information. We derive Bundle from
@@ -582,6 +594,10 @@ class Bundle(dict):
self[ARCHIVES_KEY].append(archive)
archive.Update(url)
+ def GetArchives(self):
+ '''Returns all the archives in this bundle'''
+ return self[ARCHIVES_KEY]
+
class SDKManifest(object):
'''This class contains utilities for manipulation an SDK manifest string
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/sdk_tools/update_manifest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698