summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy/app_pack_updater.h
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 10:28:28 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 10:28:28 +0000
commit5f7c4bfeed646e3744858e386669bb2d6dee11fd (patch)
tree15ca743571c82e6a78342e775f763a6db601dd0b /chrome/browser/policy/app_pack_updater.h
parente5ca636dd1b50cc61275d0f686aea895d2f42ee2 (diff)
downloadchromium_src-5f7c4bfeed646e3744858e386669bb2d6dee11fd.zip
chromium_src-5f7c4bfeed646e3744858e386669bb2d6dee11fd.tar.gz
chromium_src-5f7c4bfeed646e3744858e386669bb2d6dee11fd.tar.bz2
Delete invalid/damaged AppPack files, so that they can be downloaded again.
BUG=chromium-os:28700 TEST=Setup Kiosk Mode with an AppPack. Remove some bytes from a file in /var/cache/app_pack before starting the demo. After a restart, that extension will be restored. Review URL: http://codereview.chromium.org/9911026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/app_pack_updater.h')
-rw-r--r--chrome/browser/policy/app_pack_updater.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/policy/app_pack_updater.h b/chrome/browser/policy/app_pack_updater.h
index 1fedbe9..b34a2f0 100644
--- a/chrome/browser/policy/app_pack_updater.h
+++ b/chrome/browser/policy/app_pack_updater.h
@@ -19,7 +19,9 @@
#include "chrome/browser/extensions/updater/extension_downloader_delegate.h"
#include "chrome/browser/policy/cloud_policy_subsystem.h"
#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+class CrxInstaller;
class ExternalExtensionLoader;
class FilePath;
class GURL;
@@ -163,6 +165,10 @@ class AppPackUpdater : public CloudPolicySubsystem::Observer,
const std::string& path,
const std::string& version);
+ // Handles failure to install CRX files. The file is deleted if it came from
+ // the cache.
+ void OnCrxInstallFailed(CrxInstaller* installer);
+
// Helper to post blocking IO tasks to the blocking pool.
void PostBlockingTask(const tracked_objects::Location& from_here,
const base::Closure& task);
@@ -175,7 +181,10 @@ class AppPackUpdater : public CloudPolicySubsystem::Observer,
// Observes updates to the |device_cloud_policy_subsystem_|, to detect
// device enrollment.
- scoped_ptr<CloudPolicySubsystem::ObserverRegistrar> registrar_;
+ scoped_ptr<CloudPolicySubsystem::ObserverRegistrar> policy_registrar_;
+
+ // Observes failures to install CRX files.
+ content::NotificationRegistrar notification_registrar_;
// Unique sequence token so that tasks posted by the AppPackUpdater are
// executed sequentially in the blocking pool.