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

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

Issue 321473003: Elevated install of recovery component (component update part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial upload Created 6 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_unpacker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ffd69dd9c4adf21c1fa16a385dfdeb3c5d19207f..f65de77343cc0fccbd88244273ef0da9d40c242a 100644
--- a/chrome/browser/component_updater/component_unpacker.h
+++ b/chrome/browser/component_updater/component_unpacker.h
@@ -104,8 +104,17 @@ class ComponentUnpacker : public base::RefCountedThreadSafe<ComponentUnpacker> {
// package is a differential update. Calls |callback| with the result.
void Unpack(const Callback& callback);
+ // Creates a ComponentUnpacker by loading CRX and related information from
+ // |backup_path| that was previously saved by SaveInstallSource().
+ static scoped_refptr<ComponentUnpacker> CreateFromBackup(
+ const base::FilePath& backup_path,
+ ComponentInstaller* installer,
+ scoped_refptr<base::SequencedTaskRunner> task_runner);
+
+
private:
friend class base::RefCountedThreadSafe<ComponentUnpacker>;
+ friend class ComponentUnpackerTest;
virtual ~ComponentUnpacker();
@@ -138,6 +147,11 @@ class ComponentUnpacker : public base::RefCountedThreadSafe<ComponentUnpacker> {
// Finish is responsible for calling the callback provided in Start().
void Finish();
+ // Saves the original CRX file, along with fingerprint and other related
+ // infromation, to |backup_path|. This is for retry patching later when it
+ // fails.
+ bool SaveInstallSource(const base::FilePath& backup_path) const;
+
std::vector<uint8> pk_hash_;
base::FilePath path_;
base::FilePath unpack_path_;
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698