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

Unified Diff: chrome/browser/component_updater/pnacl/pnacl_updater_observer.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
Index: chrome/browser/component_updater/pnacl/pnacl_updater_observer.cc
diff --git a/chrome/browser/component_updater/pnacl/pnacl_updater_observer.cc b/chrome/browser/component_updater/pnacl/pnacl_updater_observer.cc
deleted file mode 100644
index 6041b5d238dc7aba9e92a9d59cf26f24c89d1646..0000000000000000000000000000000000000000
--- a/chrome/browser/component_updater/pnacl/pnacl_updater_observer.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/component_updater/pnacl/pnacl_updater_observer.h"
-
-#include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h"
-#include "content/public/browser/browser_thread.h"
-
-using content::BrowserThread;
-
-PnaclUpdaterObserver::PnaclUpdaterObserver(PnaclComponentInstaller* pci)
- : must_observe_(false), pnacl_installer_(pci) {}
-
-PnaclUpdaterObserver::~PnaclUpdaterObserver() {}
-
-void PnaclUpdaterObserver::EnsureObserving() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- must_observe_ = true;
-}
-
-void PnaclUpdaterObserver::StopObserving() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- must_observe_ = false;
-}
-
-void PnaclUpdaterObserver::OnEvent(Events event, int extra) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (must_observe_) {
- switch (event) {
- default:
- break;
- case COMPONENT_UPDATE_READY:
- // If the component updater says there is an UPDATE_READY w/ source
- // being the PNaCl ID, then installation is handed off to the PNaCl
- // installer and we can stop observing. The installer will be the one
- // to run the callback w/ success or failure.
- must_observe_ = false;
- break;
- case COMPONENT_UPDATER_SLEEPING:
- // If the component updater sleeps before an UPDATE_READY for this
- // component, then requests for installs were likely skipped,
- // an error occurred, or there was no new update.
- must_observe_ = false;
- pnacl_installer_->NotifyInstallError();
- break;
- }
- }
-}
« no previous file with comments | « chrome/browser/component_updater/pnacl/pnacl_updater_observer.h ('k') | chrome/browser/nacl_host/nacl_browser_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698