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

Unified Diff: base/version.cc

Issue 14099010: Move Version to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « base/version.h ('k') | chrome/browser/component_updater/flash_component_installer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/version.cc
diff --git a/base/version.cc b/base/version.cc
index f75873345ba57f82a95044c26f394a404175eae3..eb1806e791266015dcdbcefbc54738c6d7c9815a 100644
--- a/base/version.cc
+++ b/base/version.cc
@@ -11,6 +11,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
+namespace base {
+
namespace {
// Parses the |numbers| vector representing the different numbers
@@ -21,14 +23,14 @@ namespace {
bool ParseVersionNumbers(const std::string& version_str,
std::vector<uint16>* parsed) {
std::vector<std::string> numbers;
- base::SplitString(version_str, '.', &numbers);
+ SplitString(version_str, '.', &numbers);
if (numbers.empty())
return false;
for (std::vector<std::string>::const_iterator it = numbers.begin();
it != numbers.end(); ++it) {
int num;
- if (!base::StringToInt(*it, &num))
+ if (!StringToInt(*it, &num))
return false;
if (num < 0)
@@ -39,7 +41,7 @@ bool ParseVersionNumbers(const std::string& version_str,
return false;
// This throws out things like +3, or 032.
- if (base::IntToString(num) != *it)
+ if (IntToString(num) != *it)
return false;
parsed->push_back(static_cast<uint16>(num));
@@ -164,9 +166,11 @@ const std::string Version::GetString() const {
std::string version_str;
size_t count = components_.size();
for (size_t i = 0; i < count - 1; ++i) {
- version_str.append(base::IntToString(components_[i]));
+ version_str.append(IntToString(components_[i]));
version_str.append(".");
}
- version_str.append(base::IntToString(components_[count - 1]));
+ version_str.append(IntToString(components_[count - 1]));
return version_str;
}
+
+} // namespace base
« no previous file with comments | « base/version.h ('k') | chrome/browser/component_updater/flash_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698