summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-24 01:43:26 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-24 01:43:26 +0000
commit81ce2c47705894ebdba4344f483bc4cb8f072155 (patch)
tree24be53374f8923d32f0cf025e279f39d00267d86
parentf29b39837084fa85bba1bbe08984047ed93129e8 (diff)
downloadchromium_src-81ce2c47705894ebdba4344f483bc4cb8f072155.zip
chromium_src-81ce2c47705894ebdba4344f483bc4cb8f072155.tar.gz
chromium_src-81ce2c47705894ebdba4344f483bc4cb8f072155.tar.bz2
Make chrome/browser/chrome_browser_main_linux.* Linux-only.
BUG=none TEST=none Review URL: http://codereview.chromium.org/9839028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128650 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chrome_browser_main_extra_parts_gtk.h4
-rw-r--r--chrome/browser/chrome_browser_main_extra_parts_views.h5
-rw-r--r--chrome/browser/chrome_browser_main_linux.cc18
-rw-r--r--chrome/browser/chrome_browser_main_linux.h6
-rw-r--r--chrome/browser/chrome_browser_main_mac.h8
-rw-r--r--chrome/browser/chrome_browser_main_mac.mm5
-rw-r--r--chrome/browser/chrome_browser_main_posix.cc20
-rw-r--r--chrome/browser/chrome_browser_main_posix.h15
-rw-r--r--chrome/browser/chrome_browser_main_win.h5
-rw-r--r--chrome/browser/chrome_content_browser_client.cc4
10 files changed, 52 insertions, 38 deletions
diff --git a/chrome/browser/chrome_browser_main_extra_parts_gtk.h b/chrome/browser/chrome_browser_main_extra_parts_gtk.h
index 34b596f..ca962cf 100644
--- a/chrome/browser/chrome_browser_main_extra_parts_gtk.h
+++ b/chrome/browser/chrome_browser_main_extra_parts_gtk.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,6 +21,8 @@ class ChromeBrowserMainExtraPartsGtk : public ChromeBrowserMainExtraParts {
private:
void DetectRunningAsRoot();
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsGtk);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_GTK_H_
diff --git a/chrome/browser/chrome_browser_main_extra_parts_views.h b/chrome/browser/chrome_browser_main_extra_parts_views.h
index 6ac14c7..a7937e7 100644
--- a/chrome/browser/chrome_browser_main_extra_parts_views.h
+++ b/chrome/browser/chrome_browser_main_extra_parts_views.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,6 +16,9 @@ class ChromeBrowserMainExtraPartsViews : public ChromeBrowserMainExtraParts {
ChromeBrowserMainExtraPartsViews();
virtual void ToolkitInitialized() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsViews);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_EXTRA_PARTS_VIEWS_H_
diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc
index 4900de6..b27580d 100644
--- a/chrome/browser/chrome_browser_main_linux.cc
+++ b/chrome/browser/chrome_browser_main_linux.cc
@@ -1,26 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chrome_browser_main_linux.h"
-#if defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/chrome_browser_main_extra_parts_gtk.h"
-#endif
-
ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux(
const content::MainFunctionParams& parameters)
: ChromeBrowserMainPartsPosix(parameters) {
}
-
-void ChromeBrowserMainPartsLinux::ShowMissingLocaleMessageBox() {
-#if defined(USE_AURA)
- // This should never happen on Aura.
- NOTREACHED() << chrome_browser::kMissingLocaleDataMessage;
-#elif defined(TOOLKIT_USES_GTK)
- ChromeBrowserMainExtraPartsGtk::ShowMessageBox(
- chrome_browser::kMissingLocaleDataMessage);
-#else
-#error "Need MessageBox implementation for linux without Aura or Gtk"
-#endif
-}
diff --git a/chrome/browser/chrome_browser_main_linux.h b/chrome/browser/chrome_browser_main_linux.h
index e9f3bee..dc125b21 100644
--- a/chrome/browser/chrome_browser_main_linux.h
+++ b/chrome/browser/chrome_browser_main_linux.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,8 +16,8 @@ class ChromeBrowserMainPartsLinux : public ChromeBrowserMainPartsPosix {
explicit ChromeBrowserMainPartsLinux(
const content::MainFunctionParams& parameters);
- // ChromeBrowserMainParts overrides.
- virtual void ShowMissingLocaleMessageBox() OVERRIDE;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsLinux);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_LINUX_H_
diff --git a/chrome/browser/chrome_browser_main_mac.h b/chrome/browser/chrome_browser_main_mac.h
index dc08bbf..79c454e 100644
--- a/chrome/browser/chrome_browser_main_mac.h
+++ b/chrome/browser/chrome_browser_main_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -17,12 +17,12 @@ class ChromeBrowserMainPartsMac : public ChromeBrowserMainPartsPosix {
virtual void PreEarlyInitialization() OVERRIDE;
virtual void PreMainMessageLoopStart() OVERRIDE;
- // ChromeBrowserMainParts overrides.
- virtual void ShowMissingLocaleMessageBox() OVERRIDE;
-
// Perform platform-specific work that needs to be done after the main event
// loop has ended. The embedder must be sure to call this.
static void DidEndMainMessageLoop();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsMac);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_MAC_H_
diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm
index b1fa31f..493f8ea 100644
--- a/chrome/browser/chrome_browser_main_mac.mm
+++ b/chrome/browser/chrome_browser_main_mac.mm
@@ -114,11 +114,6 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
}
-void ChromeBrowserMainPartsMac::ShowMissingLocaleMessageBox() {
- // Not called on Mac because we load the locale files differently.
- NOTREACHED();
-}
-
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
AppController* appController = [NSApp delegate];
[appController didEndMainMessageLoop];
diff --git a/chrome/browser/chrome_browser_main_posix.cc b/chrome/browser/chrome_browser_main_posix.cc
index d99e6b3..d46986ab 100644
--- a/chrome/browser/chrome_browser_main_posix.cc
+++ b/chrome/browser/chrome_browser_main_posix.cc
@@ -27,6 +27,7 @@
#endif
#if defined(TOOLKIT_USES_GTK)
+#include "chrome/browser/chrome_browser_main_extra_parts_gtk.h"
#include "chrome/browser/printing/print_dialog_gtk.h"
#endif
@@ -272,3 +273,22 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopStart() {
&PrintDialogGtk::CreatePrintDialog);
#endif
}
+
+void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() {
+#if defined(OS_CHROMEOS)
+ NOTREACHED(); // Should not ever happen on ChromeOS.
+#elif defined(OS_ANDROID)
+ // TODO(port) Update this as needed.
+ // Probably should not ever happen on Android, but at the time of this
+ // writing, Android isn't even using ChromeBrowserMainPartsPosix yet.
+ NOTREACHED();
+#elif defined(OS_MACOSX)
+ // Not called on Mac because we load the locale files differently.
+ NOTREACHED();
+#elif defined(TOOLKIT_USES_GTK)
+ ChromeBrowserMainExtraPartsGtk::ShowMessageBox(
+ chrome_browser::kMissingLocaleDataMessage);
+#else
+#error "Need MessageBox implementation."
+#endif
+}
diff --git a/chrome/browser/chrome_browser_main_posix.h b/chrome/browser/chrome_browser_main_posix.h
index 6188de7..e8cab81 100644
--- a/chrome/browser/chrome_browser_main_posix.h
+++ b/chrome/browser/chrome_browser_main_posix.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_BROWSER_CHROME_MAIN_POSIX_H_
-#define CHROME_BROWSER_BROWSER_CHROME_MAIN_POSIX_H_
+#ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_POSIX_H_
+#define CHROME_BROWSER_CHROME_BROWSER_MAIN_POSIX_H_
#include "chrome/browser/chrome_browser_main.h"
@@ -12,8 +12,15 @@ class ChromeBrowserMainPartsPosix : public ChromeBrowserMainParts {
explicit ChromeBrowserMainPartsPosix(
const content::MainFunctionParams& parameters);
+ // content::BrowserMainParts overrides.
virtual void PreEarlyInitialization() OVERRIDE;
virtual void PostMainMessageLoopStart() OVERRIDE;
+
+ // ChromeBrowserMainParts overrides.
+ virtual void ShowMissingLocaleMessageBox() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsPosix);
};
-#endif // CHROME_BROWSER_BROWSER_CHROME_MAIN_POSIX_H_
+#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_POSIX_H_
diff --git a/chrome/browser/chrome_browser_main_win.h b/chrome/browser/chrome_browser_main_win.h
index 12b3dd1..3ba4a90 100644
--- a/chrome/browser/chrome_browser_main_win.h
+++ b/chrome/browser/chrome_browser_main_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -52,6 +52,9 @@ class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts {
// allow the user level Chrome to run. So we notify the user and uninstall
// user level Chrome.
static bool CheckMachineLevelInstall();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsWin);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_WIN_H_
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 76de231..1915f6b 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -102,7 +102,7 @@
#elif defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
#include "chrome/browser/chromeos/login/user_manager.h"
-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
+#elif defined(OS_LINUX)
#include "chrome/browser/chrome_browser_main_linux.h"
#elif defined(OS_POSIX)
#include "chrome/browser/chrome_browser_main_posix.h"
@@ -323,7 +323,7 @@ content::BrowserMainParts* ChromeContentBrowserClient::CreateBrowserMainParts(
main_parts = new ChromeBrowserMainPartsMac(parameters);
#elif defined(OS_CHROMEOS)
main_parts = new ChromeBrowserMainPartsChromeos(parameters);
-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
+#elif defined(OS_LINUX)
main_parts = new ChromeBrowserMainPartsLinux(parameters);
#elif defined(OS_ANDROID)
// Do nothing for Android.