| Index: components/nacl/common/pnacl_types.cc
|
| diff --git a/components/nacl/common/pnacl_types.cc b/components/nacl/common/pnacl_types.cc
|
| index f6302bc9c9845252f204542beadd94160acbaa9e..6c43319c6b29dce724387bf58fbb2109b1f5c058 100644
|
| --- a/components/nacl/common/pnacl_types.cc
|
| +++ b/components/nacl/common/pnacl_types.cc
|
| @@ -9,4 +9,20 @@ namespace nacl {
|
| PnaclCacheInfo::PnaclCacheInfo() {}
|
| PnaclCacheInfo::~PnaclCacheInfo() {}
|
|
|
| +// static
|
| +bool PnaclInstallProgress::progress_known(const PnaclInstallProgress& p) {
|
| + return p.total_size >= 0;
|
| +}
|
| +
|
| +// static
|
| +PnaclInstallProgress PnaclInstallProgress::Unknown() {
|
| + PnaclInstallProgress p;
|
| + p.current = 0;
|
| + // Use -1 to indicate that total is not determined.
|
| + // This matches the -1 of the OnURLFetchDownloadProgress interface in
|
| + // net/url_request/url_fetcher_delegate.h
|
| + p.total_size = -1;
|
| + return p;
|
| +}
|
| +
|
| } // namespace nacl
|
|
|