summaryrefslogtreecommitdiffstats
path: root/base/sys_info_chromeos.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-04 20:56:49 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-04 20:56:49 +0000
commit9eae4e686d49213ee7dba24cdf28f13d38b99741 (patch)
tree353f674537dc93191c54033123904fc84f2eb0cd /base/sys_info_chromeos.cc
parentba23e5d378762bf5e7a25f8f6591674c5d25e365 (diff)
downloadchromium_src-9eae4e686d49213ee7dba24cdf28f13d38b99741.zip
chromium_src-9eae4e686d49213ee7dba24cdf28f13d38b99741.tar.gz
chromium_src-9eae4e686d49213ee7dba24cdf28f13d38b99741.tar.bz2
Move more file_util functions to base namespace.
This moves DevicePathToDriveLetterPath, NormalizeToNativeFilePath, IsLink, and GetFileInfo. This also removes some explicit "base::" usage in base files I touched. TBR=jam Review URL: https://codereview.chromium.org/105293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_info_chromeos.cc')
-rw-r--r--base/sys_info_chromeos.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index e0f8b4f..7cf6975 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -56,14 +56,14 @@ class ChromeOSVersionInfo {
is_running_on_chromeos_ = false;
std::string lsb_release, lsb_release_time_str;
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ scoped_ptr<Environment> env(Environment::Create());
bool parsed_from_env =
env->GetVar(kLsbReleaseKey, &lsb_release) &&
env->GetVar(kLsbReleaseTimeKey, &lsb_release_time_str);
if (parsed_from_env) {
double us = 0;
if (StringToDouble(lsb_release_time_str, &us))
- lsb_release_time_ = base::Time::FromDoubleT(us);
+ lsb_release_time_ = Time::FromDoubleT(us);
} else {
// If the LSB_RELEASE and LSB_RELEASE_TIME environment variables are not
// set, fall back to a blocking read of the lsb_release file. This should
@@ -71,8 +71,8 @@ class ChromeOSVersionInfo {
ThreadRestrictions::ScopedAllowIO allow_io;
FilePath path(kLinuxStandardBaseReleaseFile);
ReadFileToString(path, &lsb_release);
- base::PlatformFileInfo fileinfo;
- if (file_util::GetFileInfo(path, &fileinfo))
+ PlatformFileInfo fileinfo;
+ if (GetFileInfo(path, &fileinfo))
lsb_release_time_ = fileinfo.creation_time;
}
ParseLsbRelease(lsb_release);
@@ -97,7 +97,7 @@ class ChromeOSVersionInfo {
*bugfix_version = bugfix_version_;
}
- const base::Time& lsb_release_time() const { return lsb_release_time_; }
+ const Time& lsb_release_time() const { return lsb_release_time_; }
const SysInfo::LsbReleaseMap& lsb_release_map() const {
return lsb_release_map_;
}
@@ -109,7 +109,7 @@ class ChromeOSVersionInfo {
// of entries so the overhead for this will be small, and it can be
// useful for debugging.
std::vector<std::pair<std::string, std::string> > pairs;
- base::SplitStringIntoKeyValuePairs(lsb_release, '=', '\n', &pairs);
+ SplitStringIntoKeyValuePairs(lsb_release, '=', '\n', &pairs);
for (size_t i = 0; i < pairs.size(); ++i) {
std::string key, value;
TrimWhitespaceASCII(pairs[i].first, TRIM_ALL, &key);
@@ -151,7 +151,7 @@ class ChromeOSVersionInfo {
}
}
- base::Time lsb_release_time_;
+ Time lsb_release_time_;
SysInfo::LsbReleaseMap lsb_release_map_;
int32 major_version_;
int32 minor_version_;
@@ -196,7 +196,7 @@ std::string SysInfo::GetLsbReleaseBoard() {
}
// static
-base::Time SysInfo::GetLsbReleaseTime() {
+Time SysInfo::GetLsbReleaseTime() {
return GetChromeOSVersionInfo().lsb_release_time();
}
@@ -208,10 +208,10 @@ bool SysInfo::IsRunningOnChromeOS() {
// static
void SysInfo::SetChromeOSVersionInfoForTest(const std::string& lsb_release,
const Time& lsb_release_time) {
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ scoped_ptr<Environment> env(Environment::Create());
env->SetVar(kLsbReleaseKey, lsb_release);
env->SetVar(kLsbReleaseTimeKey,
- base::DoubleToString(lsb_release_time.ToDoubleT()));
+ DoubleToString(lsb_release_time.ToDoubleT()));
g_chrome_os_version_info.Get().Parse();
}