| Index: chrome/browser/component_updater/pnacl_component_installer.cc
|
| diff --git a/chrome/browser/component_updater/pnacl_component_installer.cc b/chrome/browser/component_updater/pnacl_component_installer.cc
|
| index 4f2c8228c08f5dd8d2d66030b9a86aa271708045..4ad67f3373b07941c8207240bb6d6e5d205a24ce 100644
|
| --- a/chrome/browser/component_updater/pnacl_component_installer.cc
|
| +++ b/chrome/browser/component_updater/pnacl_component_installer.cc
|
| @@ -94,7 +94,7 @@ void OverrideDirPnaclComponent(const base::FilePath& base_path) {
|
|
|
| bool GetLatestPnaclDirectory(const scoped_refptr<PnaclComponentInstaller>& pci,
|
| base::FilePath* latest_dir,
|
| - Version* latest_version,
|
| + base::Version* latest_version,
|
| std::vector<base::FilePath>* older_dirs) {
|
| // Enumerate all versions starting from the base directory.
|
| base::FilePath base_dir = pci->GetPnaclBaseDirectory();
|
| @@ -103,7 +103,7 @@ bool GetLatestPnaclDirectory(const scoped_refptr<PnaclComponentInstaller>& pci,
|
| base_dir, false, base::FileEnumerator::DIRECTORIES);
|
| for (base::FilePath path = file_enumerator.Next(); !path.value().empty();
|
| path = file_enumerator.Next()) {
|
| - Version version(path.BaseName().MaybeAsASCII());
|
| + base::Version version(path.BaseName().MaybeAsASCII());
|
| if (!version.IsValid())
|
| continue;
|
| if (found) {
|
| @@ -158,7 +158,7 @@ base::DictionaryValue* ReadComponentManifest(
|
| // PNaCl manifest indicates this is the correct arch-specific package.
|
| bool CheckPnaclComponentManifest(const base::DictionaryValue& manifest,
|
| const base::DictionaryValue& pnacl_manifest,
|
| - Version* version_out) {
|
| + base::Version* version_out) {
|
| // Make sure we have the right |manifest| file.
|
| std::string name;
|
| if (!manifest.GetStringASCII("name", &name)) {
|
| @@ -179,7 +179,7 @@ bool CheckPnaclComponentManifest(const base::DictionaryValue& manifest,
|
| LOG(WARNING) << "'version' field is missing from manifest!";
|
| return false;
|
| }
|
| - Version version(proposed_version.c_str());
|
| + base::Version version(proposed_version.c_str());
|
| if (!version.IsValid()) {
|
| LOG(WARNING) << "'version' field in manifest is invalid "
|
| << version.GetString();
|
| @@ -233,7 +233,7 @@ bool PnaclComponentInstaller::Install(const base::DictionaryValue& manifest,
|
| return false;
|
| }
|
|
|
| - Version version;
|
| + base::Version version;
|
| if (!CheckPnaclComponentManifest(manifest, *pnacl_manifest, &version)) {
|
| LOG(WARNING) << "CheckPnaclComponentManifest failed, not installing.";
|
| return false;
|
| @@ -271,7 +271,7 @@ bool PnaclComponentInstaller::Install(const base::DictionaryValue& manifest,
|
| // |installed_file| actually exists.
|
| bool PnaclComponentInstaller::GetInstalledFile(const std::string& file,
|
| base::FilePath* installed_file) {
|
| - if (current_version().Equals(Version(kNullVersion)))
|
| + if (current_version().Equals(base::Version(kNullVersion)))
|
| return false;
|
|
|
| *installed_file = GetPnaclBaseDirectory()
|
| @@ -298,7 +298,7 @@ CrxComponent PnaclComponentInstaller::GetCrxComponent() {
|
| namespace {
|
|
|
| void FinishPnaclUpdateRegistration(
|
| - const Version& current_version,
|
| + const base::Version& current_version,
|
| const std::string& current_fingerprint,
|
| const scoped_refptr<PnaclComponentInstaller>& pci) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| @@ -324,13 +324,13 @@ void StartPnaclUpdateRegistration(
|
| }
|
| }
|
|
|
| - Version current_version(kNullVersion);
|
| + base::Version current_version(kNullVersion);
|
| std::string current_fingerprint;
|
| std::vector<base::FilePath> older_dirs;
|
| if (GetLatestPnaclDirectory(pci, &path, ¤t_version, &older_dirs)) {
|
| scoped_ptr<base::DictionaryValue> manifest(ReadComponentManifest(path));
|
| scoped_ptr<base::DictionaryValue> pnacl_manifest(ReadPnaclManifest(path));
|
| - Version manifest_version;
|
| + base::Version manifest_version;
|
| // Check that the component manifest and PNaCl manifest files
|
| // are legit, and that the indicated version matches the one
|
| // encoded within the path name.
|
| @@ -339,7 +339,7 @@ void StartPnaclUpdateRegistration(
|
| *pnacl_manifest,
|
| &manifest_version) ||
|
| !current_version.Equals(manifest_version)) {
|
| - current_version = Version(kNullVersion);
|
| + current_version = base::Version(kNullVersion);
|
| } else {
|
| OverrideDirPnaclComponent(path);
|
| base::ReadFileToString(path.AppendASCII("manifest.fingerprint"),
|
|
|