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

Unified Diff: chrome/installer/util/installer_state.cc

Issue 1281313003: base: Remove using:: declaration from version.h header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 5 years, 4 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
Index: chrome/installer/util/installer_state.cc
diff --git a/chrome/installer/util/installer_state.cc b/chrome/installer/util/installer_state.cc
index 37e6abc1d347ae0e5d01de465041f5a7461bce90..6215bf6ce20397ecb81e23fa08c877cfab6633bd 100644
--- a/chrome/installer/util/installer_state.cc
+++ b/chrome/installer/util/installer_state.cc
@@ -159,7 +159,7 @@ void InstallerState::Initialize(const base::CommandLine& command_line,
// Parse --critical-update-version=W.X.Y.Z
std::string critical_version_value(
command_line.GetSwitchValueASCII(switches::kCriticalUpdateVersion));
- critical_update_version_ = Version(critical_version_value);
+ critical_update_version_ = base::Version(critical_version_value);
}
void InstallerState::set_level(Level level) {
@@ -367,10 +367,10 @@ const Product* InstallerState::FindProduct(
return NULL;
}
-Version* InstallerState::GetCurrentVersion(
+base::Version* InstallerState::GetCurrentVersion(
const InstallationState& machine_state) const {
DCHECK(!products_.empty());
- scoped_ptr<Version> current_version;
+ scoped_ptr<base::Version> current_version;
// If we're doing a multi-install, the current version may be either an
// existing multi or an existing single product that is being migrated
// in place (i.e., Chrome). In the latter case, there is no existing
@@ -402,7 +402,7 @@ Version* InstallerState::GetCurrentVersion(
machine_state.GetProductState(level_ == SYSTEM_LEVEL, prod_type);
if (product_state != NULL) {
- const Version* version = NULL;
+ const base::Version* version = NULL;
// Be aware that there might be a pending "new_chrome.exe" already in the
// installation path. If so, we use old_version, which holds the version of
@@ -413,15 +413,15 @@ Version* InstallerState::GetCurrentVersion(
if (version == NULL)
version = &product_state->version();
- current_version.reset(new Version(*version));
+ current_version.reset(new base::Version(*version));
}
return current_version.release();
}
-Version InstallerState::DetermineCriticalVersion(
- const Version* current_version,
- const Version& new_version) const {
+base::Version InstallerState::DetermineCriticalVersion(
+ const base::Version* current_version,
+ const base::Version& new_version) const {
DCHECK(current_version == NULL || current_version->IsValid());
DCHECK(new_version.IsValid());
if (critical_update_version_.IsValid() &&
@@ -430,7 +430,7 @@ Version InstallerState::DetermineCriticalVersion(
new_version.CompareTo(critical_update_version_) >= 0) {
return critical_update_version_;
}
- return Version();
+ return base::Version();
}
bool InstallerState::IsChromeFrameRunning(
@@ -447,7 +447,7 @@ bool InstallerState::AreBinariesInUse(
}
base::FilePath InstallerState::GetInstallerDirectory(
- const Version& version) const {
+ const base::Version& version) const {
return target_path().AppendASCII(version.GetString()).Append(kInstallerDir);
}
@@ -494,7 +494,7 @@ bool InstallerState::AnyExistsAndIsInUse(
// Check only for the current version (i.e., the version we are upgrading
// _from_). Later versions from pending in-use updates need not be checked
// since the current version is guaranteed to be in use if any such are.
- scoped_ptr<Version> current_version(GetCurrentVersion(machine_state));
+ scoped_ptr<base::Version> current_version(GetCurrentVersion(machine_state));
if (!current_version)
return false;
base::FilePath directory(
@@ -531,10 +531,10 @@ void InstallerState::GetExistingExeVersions(
}
void InstallerState::RemoveOldVersionDirectories(
- const Version& new_version,
- Version* existing_version,
+ const base::Version& new_version,
+ base::Version* existing_version,
const base::FilePath& temp_path) const {
- Version version;
+ base::Version version;
scoped_ptr<WorkItem> item;
std::set<std::string> existing_version_strings;
@@ -552,7 +552,7 @@ void InstallerState::RemoveOldVersionDirectories(
for (base::FilePath next_version = version_enum.Next(); !next_version.empty();
next_version = version_enum.Next()) {
base::FilePath dir_name(next_version.BaseName());
- version = Version(base::UTF16ToASCII(dir_name.value()));
+ version = base::Version(base::UTF16ToASCII(dir_name.value()));
// Delete the version folder if it is less than the new version and not
// equal to the old version (if we have an old version).
if (version.IsValid() &&
« no previous file with comments | « chrome/installer/util/installation_validator_unittest.cc ('k') | chrome/installer/util/installer_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698