Index: chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc |
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc |
index be7b34d69ae27012609f833d89fc3d6e28fa28bb..2bffbd4c9fcedf2f8d416d8567baa510db1391df 100644 |
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc |
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc |
@@ -4,7 +4,6 @@ |
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" |
-#include "base/command_line.h" |
#include "base/run_loop.h" |
#include "chrome/browser/chrome_browser_main.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -12,17 +11,12 @@ |
#include "chrome/browser/themes/theme_service_factory.h" |
#include "chrome/browser/ui/browser_list.h" |
#include "chrome/browser/ui/libgtkui/gtk_ui.h" |
-#include "chrome/browser/ui/simple_message_box.h" |
#include "chrome/browser/ui/views/frame/browser_view.h" |
-#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
-#include "chrome/grit/chromium_strings.h" |
-#include "chrome/grit/generated_resources.h" |
#include "components/prefs/pref_service.h" |
#include "ui/aura/env.h" |
#include "ui/aura/window.h" |
#include "ui/base/ime/input_method_initializer.h" |
-#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/ui_base_switches.h" |
#include "ui/display/display.h" |
#include "ui/display/screen.h" |
@@ -97,33 +91,6 @@ void ChromeBrowserMainExtraPartsViewsLinux::PreCreateThreads() { |
views::X11DesktopHandler::get()->AddObserver(this); |
} |
-void ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() { |
- 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)) |
- return; |
- |
- base::string16 title = l10n_util::GetStringFUTF16( |
- IDS_REFUSE_TO_RUN_AS_ROOT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
- base::string16 message = l10n_util::GetStringFUTF16( |
- IDS_REFUSE_TO_RUN_AS_ROOT_2, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
- |
- chrome::ShowWarningMessageBox(NULL, title, message); |
- |
- // Avoids gpu_process_transport_factory.cc(153)] Check failed: |
- // per_compositor_data_.empty() when quit is chosen. |
- base::RunLoop().RunUntilIdle(); |
- |
- exit(EXIT_FAILURE); |
-} |
- |
void ChromeBrowserMainExtraPartsViewsLinux::OnWorkspaceChanged( |
const std::string& new_workspace) { |
BrowserList::MoveBrowsersInWorkspaceToFront(new_workspace); |