summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 23:06:16 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 23:06:16 +0000
commit77549f63cf263fc4e61f06781289e3acadbe6bbd (patch)
tree45966b3c2569c6abfdecc5bef023fec700648274 /webkit
parentde7658e42d2db2980e4cddafef37a0dd61eb07a9 (diff)
downloadchromium_src-77549f63cf263fc4e61f06781289e3acadbe6bbd.zip
chromium_src-77549f63cf263fc4e61f06781289e3acadbe6bbd.tar.gz
chromium_src-77549f63cf263fc4e61f06781289e3acadbe6bbd.tar.bz2
fileapi: Use base::chromeos::IsRunningOnChromeOS()
And remove the copied code. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9965033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/chromeos/fileapi/cros_mount_point_provider.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index 5004ed8..74d0849 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -4,6 +4,7 @@
#include "webkit/chromeos/fileapi/cros_mount_point_provider.h"
+#include "base/chromeos/chromeos_version.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
@@ -26,21 +27,10 @@ namespace {
const char kChromeUIScheme[] = "chrome";
-// Copied from chrome/browser/chromeos/system/runtime_environment.h
-// TODO(satorux): oshima is now moving the function to 'base/chromeos'.
-// Use the one in 'base/chromeos' once it's done.
-bool IsRunningOnChromeOS() {
- // Check if the user name is chronos. Note that we don't go with
- // getuid() + getpwuid_r() as it may end up reading /etc/passwd, which
- // can be expensive.
- const char* user = getenv("USER");
- return user && strcmp(user, "chronos") == 0;
-}
-
// Returns the home directory path, or an empty string if the home directory
// is not found.
std::string GetHomeDirectory() {
- if (IsRunningOnChromeOS())
+ if (base::chromeos::IsRunningOnChromeOS())
return "/home/chronos/user";
const char* home = getenv("HOME");