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

Unified Diff: components/nacl/common/pnacl_types.cc

Issue 19863003: PNaCl on-demand installs: Make a separate async IPC to check if PNaCl is installed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: take out progress IPC for now Created 7 years, 4 months 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 | « components/nacl/common/pnacl_types.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/nacl/common/pnacl_types.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698