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

Unified Diff: chrome/browser/component_updater/component_unpacker.h

Issue 15908002: Differential updates for components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync to LKGR revision 207804. Created 7 years, 6 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/component_updater/component_unpacker.h
diff --git a/chrome/browser/component_updater/component_unpacker.h b/chrome/browser/component_updater/component_unpacker.h
index e51555cf5df6a4b40f4d06004637f232588bd7d9..6ae7277c2ccf232bcd1624772b41180507be7afd 100644
--- a/chrome/browser/component_updater/component_unpacker.h
+++ b/chrome/browser/component_updater/component_unpacker.h
@@ -5,11 +5,13 @@
#ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UNPACKER_H_
#define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UNPACKER_H_
+#include <string>
#include <vector>
-
+#include "base/basictypes.h"
#include "base/files/file_path.h"
class ComponentInstaller;
+class ComponentPatcher;
// In charge of unpacking the component CRX package and verifying that it is
// well formed and the cryptographic signature is correct. If there is no
@@ -26,22 +28,33 @@ class ComponentInstaller;
class ComponentUnpacker {
public:
// Possible error conditions.
+ // Add only to the bottom of this enum; the order must be kept stable.
enum Error {
kNone,
kInvalidParams,
kInvalidFile,
- kUzipPathError,
+ kUnzipPathError,
kUnzipFailed,
kNoManifest,
kBadManifest,
kBadExtension,
kInvalidId,
kInstallerError,
+ kIoError,
+ kDeltaVerificationFailure,
+ kDeltaBadCommands,
+ kDeltaUnsupportedCommand,
+ kDeltaOperationFailure,
+ kDeltaPatchProcessFailure,
+ kDeltaMissingExistingFile,
+ kFingerprintWriteFailed,
};
// Unpacks, verifies and calls the installer. |pk_hash| is the expected
// public key SHA256 hash. |path| is the current location of the CRX.
ComponentUnpacker(const std::vector<uint8>& pk_hash,
const base::FilePath& path,
+ const std::string& fingerprint,
+ ComponentPatcher* patcher,
ComponentInstaller* installer);
// If something went wrong during unpacking or installer invocation, the
@@ -50,9 +63,12 @@ class ComponentUnpacker {
Error error() const { return error_; }
+ int extended_error() const { return extended_error_; }
+
private:
base::FilePath unpack_path_;
Error error_;
+ int extended_error_; // Provides additional error information.
};
#endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UNPACKER_H_
« no previous file with comments | « chrome/browser/component_updater/component_patcher_win.cc ('k') | chrome/browser/component_updater/component_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698