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

Unified Diff: base/sys_info_chromeos.cc

Issue 105293002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « base/nix/mime_util_xdg.cc ('k') | chrome/browser/browsing_data/browsing_data_database_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_chromeos.cc
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index e0f8b4f07b46e013a30808642d16b0709628ccd2..7cf6975346000d98486715518bbcc4e84203cd07 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();
}
« no previous file with comments | « base/nix/mime_util_xdg.cc ('k') | chrome/browser/browsing_data/browsing_data_database_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698