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

Unified Diff: chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc

Issue 2462423002: Condition the use of ChromeBrowserMainExtraPartsViewsLinux to !use_ozone (Closed)
Patch Set: same as patchset 6, w/ grouped includes Created 4 years, 1 month 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 | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698