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

Unified Diff: chrome/browser/nacl_host/nacl_browser_delegate_impl.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: const ref Created 7 years, 5 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
Index: chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
index c90aa92f6f20bddbb603f7631c24249c75fb28e6..fd982ac7cc73e23fe8e29f193979533fdfd58308 100644
--- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
+++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
#include "base/path_service.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
#include "chrome/browser/nacl_host/nacl_infobar_delegate.h"
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
#include "chrome/common/chrome_paths.h"
@@ -56,3 +58,14 @@ ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory(
content::BrowserPpapiHost* ppapi_host) {
return new chrome::ChromeBrowserPepperHostFactory(ppapi_host);
}
+
+void NaClBrowserDelegateImpl::TryInstallPnacl(
+ const base::Callback<void(bool)>& installed) {
+ ComponentUpdateService* cus = g_browser_process->component_updater();
+ PnaclComponentInstaller* pci =
+ g_browser_process->pnacl_component_installer();
+ if (cus && pci)
+ RequestFirstInstall(cus, pci, installed);
Derek Schuff 2013/07/23 21:39:29 maybe for another CL, but is there any reason this
jvoung (off chromium) 2013/07/31 21:41:07 Ah yes... moving out of global namespace in a sepa
+ else
+ installed.Run(false);
+}

Powered by Google App Engine
This is Rietveld 408576698