Index: chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
index c3ae2659554ed30127d1800e860c8f66a3c7dca7..ba59db86ad4e699e18a20441ffbdbf95289306e1 100644 |
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc |
@@ -74,12 +74,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit() { |
// On the Linux desktop, we want to prevent the user from logging in as root, |
// so that we don't destroy the profile. Now that we have some minimal ui |
// initialized, check to see if we're running as root and bail if we are. |
- if (getuid() != 0) |
- return; |
- |
- const base::CommandLine& command_line = |
- *base::CommandLine::ForCurrentProcess(); |
- if (command_line.HasSwitch(switches::kUserDataDir)) |
+ if (geteuid() != 0) |
return; |
base::string16 title = l10n_util::GetStringFUTF16( |