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

Unified Diff: chrome/browser/component_updater/pnacl/pnacl_component_installer.cc

Issue 100543005: Update all users of base::Version to explicitly specify the namespace, and clean up the header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: someday it will work Created 7 years 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/pnacl/pnacl_component_installer.cc
diff --git a/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc b/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
index 2f9a10e36e89eae0618c725f3ca75a729151d18b..b7e9d2d421dfa0de91aa3b9cd86c6f49219685ef 100644
--- a/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
+++ b/chrome/browser/component_updater/pnacl/pnacl_component_installer.cc
@@ -90,7 +90,7 @@ void OverrideDirPnaclComponent(const base::FilePath& base_path) {
bool GetLatestPnaclDirectory(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();
@@ -99,7 +99,7 @@ bool GetLatestPnaclDirectory(PnaclComponentInstaller* pci,
file_enumerator(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) {
@@ -155,7 +155,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)) {
@@ -177,7 +177,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();
@@ -259,7 +259,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;
@@ -297,7 +297,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().AppendASCII(
@@ -318,7 +318,7 @@ CrxComponent PnaclComponentInstaller::GetCrxComponent() {
namespace {
-void FinishPnaclUpdateRegistration(const Version& current_version,
+void FinishPnaclUpdateRegistration(const base::Version& current_version,
const std::string& current_fingerprint,
PnaclComponentInstaller* pci) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -347,7 +347,7 @@ void StartPnaclUpdateRegistration(PnaclComponentInstaller* pci) {
}
}
- Version current_version(kNullVersion);
+ base::Version current_version(kNullVersion);
std::string current_fingerprint;
std::vector<base::FilePath> older_dirs;
if (GetLatestPnaclDirectory(pci, &path, &current_version, &older_dirs)) {
@@ -355,7 +355,7 @@ void StartPnaclUpdateRegistration(PnaclComponentInstaller* pci) {
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.
@@ -364,7 +364,7 @@ void StartPnaclUpdateRegistration(PnaclComponentInstaller* pci) {
*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"),

Powered by Google App Engine
This is Rietveld 408576698