Index: components/component_updater/default_component_installer.h |
diff --git a/components/component_updater/default_component_installer.h b/components/component_updater/default_component_installer.h |
index ff337df976f59e3d8d6388caaa87c20bb01b0662..4b243495021d849a6ef2792ce6f063fb7e4b3f96 100644 |
--- a/components/component_updater/default_component_installer.h |
+++ b/components/component_updater/default_component_installer.h |
@@ -12,6 +12,7 @@ |
#include <vector> |
#include "base/callback_forward.h" |
+#include "base/files/file_path.h" |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
#include "base/threading/thread_checker.h" |
@@ -20,7 +21,6 @@ |
#include "components/update_client/update_client.h" |
namespace base { |
-class FilePath; |
class SequencedTaskRunner; |
class SingleThreadTaskRunner; |
} // namespace base |
@@ -76,9 +76,9 @@ class ComponentInstallerTraits { |
const base::FilePath& install_dir, |
std::unique_ptr<base::DictionaryValue> manifest) = 0; |
- // Returns the directory that the installer will place versioned installs of |
- // the component into. |
- virtual base::FilePath GetBaseDirectory() const = 0; |
+ // Returns a filesystem-safe name that will be used as the directory name for |
Sorin Jianu
2016/05/03 21:51:24
filesystem-safe is redundant now, since the return
waffles
2016/05/03 22:14:05
Done.
|
+ // the component's contents. |
+ virtual base::FilePath GetRelativeInstallDir() const = 0; |
// Returns the component's SHA2 hash as raw bytes. |
virtual void GetHash(std::vector<uint8_t>* hash) const = 0; |
@@ -112,12 +112,13 @@ class DefaultComponentInstaller : public update_client::CrxInstaller { |
const base::FilePath& unpack_path) override; |
bool GetInstalledFile(const std::string& file, |
base::FilePath* installed_file) override; |
+ // Only user-level component installations can be uninstalled. |
bool Uninstall() override; |
private: |
~DefaultComponentInstaller() override; |
- base::FilePath GetInstallDirectory(); |
+ bool LoadSystemInstallation(); |
xhwang
2016/05/03 22:49:42
nit: document what it does and what the return val
waffles
2016/05/10 18:15:53
Done.
|
bool InstallHelper(const base::DictionaryValue& manifest, |
const base::FilePath& unpack_path, |
const base::FilePath& install_path); |
@@ -127,6 +128,7 @@ class DefaultComponentInstaller : public update_client::CrxInstaller { |
void ComponentReady(std::unique_ptr<base::DictionaryValue> manifest); |
void UninstallOnTaskRunner(); |
+ base::FilePath current_install_dir_; |
base::Version current_version_; |
std::string current_fingerprint_; |
std::unique_ptr<base::DictionaryValue> current_manifest_; |