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

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

Issue 1301883002: Revert of base: Remove using:: declaration from version.h header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 6215bf6ce20397ecb81e23fa08c877cfab6633bd..37e6abc1d347ae0e5d01de465041f5a7461bce90 100644
--- a/chrome/installer/util/installer_state.cc
+++ b/chrome/installer/util/installer_state.cc
@@ -159,7 +159,7 @@
// Parse --critical-update-version=W.X.Y.Z
std::string critical_version_value(
command_line.GetSwitchValueASCII(switches::kCriticalUpdateVersion));
- critical_update_version_ = base::Version(critical_version_value);
+ critical_update_version_ = Version(critical_version_value);
}
void InstallerState::set_level(Level level) {
@@ -367,10 +367,10 @@
return NULL;
}
-base::Version* InstallerState::GetCurrentVersion(
+Version* InstallerState::GetCurrentVersion(
const InstallationState& machine_state) const {
DCHECK(!products_.empty());
- scoped_ptr<base::Version> current_version;
+ scoped_ptr<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 @@
machine_state.GetProductState(level_ == SYSTEM_LEVEL, prod_type);
if (product_state != NULL) {
- const base::Version* version = NULL;
+ const 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 @@
if (version == NULL)
version = &product_state->version();
- current_version.reset(new base::Version(*version));
+ current_version.reset(new Version(*version));
}
return current_version.release();
}
-base::Version InstallerState::DetermineCriticalVersion(
- const base::Version* current_version,
- const base::Version& new_version) const {
+Version InstallerState::DetermineCriticalVersion(
+ const Version* current_version,
+ const Version& new_version) const {
DCHECK(current_version == NULL || current_version->IsValid());
DCHECK(new_version.IsValid());
if (critical_update_version_.IsValid() &&
@@ -430,7 +430,7 @@
new_version.CompareTo(critical_update_version_) >= 0) {
return critical_update_version_;
}
- return base::Version();
+ return Version();
}
bool InstallerState::IsChromeFrameRunning(
@@ -447,7 +447,7 @@
}
base::FilePath InstallerState::GetInstallerDirectory(
- const base::Version& version) const {
+ const Version& version) const {
return target_path().AppendASCII(version.GetString()).Append(kInstallerDir);
}
@@ -494,7 +494,7 @@
// 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<base::Version> current_version(GetCurrentVersion(machine_state));
+ scoped_ptr<Version> current_version(GetCurrentVersion(machine_state));
if (!current_version)
return false;
base::FilePath directory(
@@ -531,10 +531,10 @@
}
void InstallerState::RemoveOldVersionDirectories(
- const base::Version& new_version,
- base::Version* existing_version,
+ const Version& new_version,
+ Version* existing_version,
const base::FilePath& temp_path) const {
- base::Version version;
+ Version version;
scoped_ptr<WorkItem> item;
std::set<std::string> existing_version_strings;
@@ -552,7 +552,7 @@
for (base::FilePath next_version = version_enum.Next(); !next_version.empty();
next_version = version_enum.Next()) {
base::FilePath dir_name(next_version.BaseName());
- version = base::Version(base::UTF16ToASCII(dir_name.value()));
+ version = 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