OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 5 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" | 9 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
10 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" | 10 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 return chrome::VersionInfo().CreateVersionString(); | 54 return chrome::VersionInfo().CreateVersionString(); |
55 } | 55 } |
56 | 56 |
57 ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory( | 57 ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory( |
58 content::BrowserPpapiHost* ppapi_host) { | 58 content::BrowserPpapiHost* ppapi_host) { |
59 return new chrome::ChromeBrowserPepperHostFactory(ppapi_host); | 59 return new chrome::ChromeBrowserPepperHostFactory(ppapi_host); |
60 } | 60 } |
61 | 61 |
62 void NaClBrowserDelegateImpl::TryInstallPnacl( | 62 void NaClBrowserDelegateImpl::TryInstallPnacl( |
63 const base::Callback<void(bool)>& installed) { | 63 const base::Callback<void(bool)>& installed) { |
64 ComponentUpdateService* cus = g_browser_process->component_updater(); | |
65 PnaclComponentInstaller* pci = | 64 PnaclComponentInstaller* pci = |
66 g_browser_process->pnacl_component_installer(); | 65 g_browser_process->pnacl_component_installer(); |
67 RequestFirstInstall(cus, pci, installed); | 66 if (pci) |
| 67 pci->RequestFirstInstall(installed); |
| 68 else |
| 69 installed.Run(false); |
68 } | 70 } |
OLD | NEW |