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

Unified Diff: chrome/browser/nacl_host/nacl_file_host.cc

Issue 55463002: Remove PNaCl's RequestFirstInstall, use resource throttle instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reorder functions Created 7 years, 1 month 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 | « chrome/browser/nacl_host/nacl_file_host.h ('k') | chrome/browser/nacl_host/nacl_file_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_file_host.cc
diff --git a/chrome/browser/nacl_host/nacl_file_host.cc b/chrome/browser/nacl_host/nacl_file_host.cc
index 1ff6378fa54ab9ddbe6b50956b4f8ec9eb2119b0..0596376ba45e6ef10b5c9f67801bbfb993a741e7 100644
--- a/chrome/browser/nacl_host/nacl_file_host.cc
+++ b/chrome/browser/nacl_host/nacl_file_host.cc
@@ -15,7 +15,6 @@
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/common/nacl_browser_delegate.h"
#include "components/nacl/common/nacl_host_messages.h"
-#include "components/nacl/common/pnacl_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/site_instance.h"
@@ -39,37 +38,6 @@ void NotifyRendererOfError(
nacl_host_message_filter->Send(reply_msg);
}
-void TryInstallPnacl(
- const nacl_file_host::InstallCallback& done_callback,
- const nacl_file_host::InstallProgressCallback& progress_callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- // TODO(jvoung): Figure out a way to get progress events and
- // call progress_callback.
- nacl::NaClBrowser::GetDelegate()->TryInstallPnacl(done_callback);
-}
-
-void DoEnsurePnaclInstalled(
- const nacl_file_host::InstallCallback& done_callback,
- const nacl_file_host::InstallProgressCallback& progress_callback) {
- DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
- // If already installed, return reply w/ success immediately.
- base::FilePath pnacl_dir;
- if (nacl::NaClBrowser::GetDelegate()->GetPnaclDirectory(&pnacl_dir)
- && !pnacl_dir.empty()
- && base::PathExists(pnacl_dir)) {
- done_callback.Run(true);
- return;
- }
-
- // Otherwise, request an install (but send some "unknown" progress first).
- progress_callback.Run(nacl::PnaclInstallProgress::Unknown());
- // TryInstall after sending the progress event so that they are more ordered.
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&TryInstallPnacl, done_callback, progress_callback));
-}
-
bool PnaclDoOpenFile(const base::FilePath& file_to_open,
base::PlatformFile* out_file) {
base::PlatformFileError error_code;
@@ -186,18 +154,6 @@ void DoOpenNaClExecutableOnThreadPool(
namespace nacl_file_host {
-void EnsurePnaclInstalled(
- const InstallCallback& done_callback,
- const InstallProgressCallback& progress_callback) {
- if (!BrowserThread::PostBlockingPoolTask(
- FROM_HERE,
- base::Bind(&DoEnsurePnaclInstalled,
- done_callback,
- progress_callback))) {
- done_callback.Run(false);
- }
-}
-
void GetReadonlyPnaclFd(
scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter,
const std::string& filename,
« no previous file with comments | « chrome/browser/nacl_host/nacl_file_host.h ('k') | chrome/browser/nacl_host/nacl_file_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698