Chromium Code Reviews| 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..b0c5f24de31655e47e440408d87af0571fe3672f 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 |
| + // the component's contents. |
| + virtual std::string GetASCIIDirectoryName() const = 0; |
|
xhwang
2016/05/02 17:47:00
What's the reason that we have to use ASCII dir na
Sorin Jianu
2016/05/03 00:04:43
A more descriptive name would be desired, not sure
waffles
2016/05/03 21:04:22
Clarified that this should be a relative path, cha
waffles
2016/05/03 21:04:23
Changed the name.
|
| // Returns the component's SHA2 hash as raw bytes. |
| virtual void GetHash(std::vector<uint8_t>* hash) const = 0; |
| @@ -112,12 +112,12 @@ 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 InstallHelper(const base::DictionaryValue& manifest, |
| const base::FilePath& unpack_path, |
| const base::FilePath& install_path); |
| @@ -127,6 +127,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_; |