summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/app_modal_dialog.h4
-rw-r--r--chrome/browser/browser_focus_uitest.cc12
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc8
-rw-r--r--chrome/browser/browser_process.h2
-rw-r--r--chrome/browser/browser_process_impl.cc4
-rw-r--r--chrome/browser/chrome_thread.cc2
-rw-r--r--chrome/browser/defaults.cc2
-rw-r--r--chrome/browser/defaults.h2
-rw-r--r--chrome/browser/diagnostics/diagnostics_model.cc12
-rw-r--r--chrome/browser/extensions/extension_host.cc16
-rw-r--r--chrome/browser/extensions/extension_host.h12
-rw-r--r--chrome/browser/icon_loader.h4
-rw-r--r--chrome/browser/importer/firefox_profile_lock.cc10
-rw-r--r--chrome/browser/importer/importer.cc6
-rw-r--r--chrome/browser/jankometer.cc4
-rw-r--r--chrome/browser/plugin_process_host.cc8
-rw-r--r--chrome/browser/process_singleton.h6
-rw-r--r--chrome/browser/profile.cc34
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc17
-rw-r--r--chrome/browser/shell_integration.h4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc4
-rw-r--r--chrome/browser/tab_contents/constrained_window.h6
-rw-r--r--chrome/browser/tab_contents/tab_contents.h2
23 files changed, 92 insertions, 89 deletions
diff --git a/chrome/browser/app_modal_dialog.h b/chrome/browser/app_modal_dialog.h
index de87749..6567db8 100644
--- a/chrome/browser/app_modal_dialog.h
+++ b/chrome/browser/app_modal_dialog.h
@@ -23,7 +23,7 @@ typedef ModalDialogDelegate* NativeDialog;
class NSAlert;
#endif
typedef NSAlert* NativeDialog;
-#elif defined(OS_POSIX)
+#elif defined(TOOLKIT_USES_GTK)
typedef struct _GtkDialog GtkDialog;
typedef struct _GtkWidget GtkWidget;
typedef int gint;
@@ -62,7 +62,7 @@ class AppModalDialog {
// delete the AppModalDialog associated with it.
virtual void CreateAndShowDialog();
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
virtual void HandleDialogResponse(GtkDialog* dialog, gint response_id) = 0;
// Callback for dialog response calls, passes results to specialized
// HandleDialogResponse() implementation.
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 05b45205..47bace1 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -28,7 +28,7 @@
#include "chrome/browser/views/tab_contents/tab_contents_container.h"
#endif
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
#include "chrome/browser/gtk/view_id_util.h"
#endif
@@ -74,7 +74,7 @@ class BrowserFocusTest : public InProcessBrowserTest {
// TODO(jcampan): retrieve the WidgetWin and show/hide on it instead of
// using Windows API.
::ShowWindow(window, SW_HIDE);
-#elif defined(OS_LINUX)
+#elif defined(TOOLKIT_USES_GTK)
gtk_widget_hide(GTK_WIDGET(window));
#else
NOTIMPLEMENTED();
@@ -86,7 +86,7 @@ class BrowserFocusTest : public InProcessBrowserTest {
// TODO(jcampan): retrieve the WidgetWin and show/hide on it instead of
// using Windows API.
::ShowWindow(window, SW_SHOW);
-#elif defined(OS_LINUX)
+#elif defined(TOOLKIT_USES_GTK)
gtk_widget_hide(GTK_WIDGET(window));
#else
NOTIMPLEMENTED();
@@ -169,7 +169,7 @@ class TestInterstitialPage : public InterstitialPage {
} // namespace
IN_PROC_BROWSER_TEST_F(BrowserFocusTest, ClickingMovesFocus) {
-#if defined(OS_LINUX)
+#if defined(USE_X11)
// It seems we have to wait a little bit for the widgets to spin up before
// we can start clicking on them.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -377,8 +377,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) {
Browser* focused_browser = NULL;
Browser* unfocused_browser = NULL;
-#if defined(OS_LINUX)
- // On Linux, calling Activate() is not guaranteed to move focus, so we have
+#if defined(USE_X11)
+ // On X11, calling Activate() is not guaranteed to move focus, so we have
// to figure out which browser does have focus.
if (browser2->window()->IsActive()) {
focused_browser = browser2;
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 897b264..cf23cba 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -526,8 +526,8 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, AccessKeys) {
// Make sure no element is focused.
EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L""));
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAlt1));
-#if defined(OS_LINUX)
- // On Linux, alt-0..9 are assigned as tab selection accelerators, so they can
+#if defined(TOOLKIT_GTK)
+ // On GTK, alt-0..9 are assigned as tab selection accelerators, so they can
// not be used as accesskeys.
EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L""));
#elif defined(OS_WIN)
@@ -568,8 +568,8 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, ReservedAccelerators) {
ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_W, true, false, false));
EXPECT_EQ(1, browser()->tab_count());
-#elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)
- // Ctrl-[a-z] are not treated as reserved accelerators on Linux.
+#elif defined(TOOLKIT_GTK)
+ // Ctrl-[a-z] are not treated as reserved accelerators on GTK.
static const KeyEventTestData kTestCtrlT = {
base::VKEY_T, true, false, false,
false, false, false, false, 2,
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index 675b477..efab8d7 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -100,7 +100,7 @@ class BrowserProcess {
// database. History has its own thread since it has much higher traffic.
virtual base::Thread* db_thread() = 0;
-#if defined(OS_LINUX)
+#if defined(USE_X11)
// Returns the thread that is used to process UI requests in cases where
// we can't route the request to the UI thread. Note that this thread
// should only be used by the IO thread and this method is only safe to call
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index c510336..9e9e1b0 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -136,7 +136,7 @@ BrowserProcessImpl::~BrowserProcessImpl() {
resource_dispatcher_host()->Shutdown();
}
-#if defined(OS_LINUX)
+#if defined(USE_X11)
// The IO thread must outlive the BACKGROUND_X11 thread.
background_x11_thread_.reset();
#endif
@@ -304,7 +304,7 @@ void BrowserProcessImpl::CreateIOThread() {
// invoke the io_thread() accessor.
PluginService::GetInstance();
-#if defined(OS_LINUX)
+#if defined(USE_X11)
// The lifetime of the BACKGROUND_X11 thread is a subset of the IO thread so
// we start it now.
scoped_ptr<base::Thread> background_x11_thread(
diff --git a/chrome/browser/chrome_thread.cc b/chrome/browser/chrome_thread.cc
index a5cbe89..13975d6 100644
--- a/chrome/browser/chrome_thread.cc
+++ b/chrome/browser/chrome_thread.cc
@@ -12,7 +12,7 @@ static const char* chrome_thread_names[ChromeThread::ID_COUNT] = {
"Chrome_FileThread", // FILE
"Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER
"Chrome_IOThread", // IO
-#if defined(OS_LINUX)
+#if defined(USE_X11)
"Chrome_Background_X11Thread", // BACKGROUND_X11
#endif
};
diff --git a/chrome/browser/defaults.cc b/chrome/browser/defaults.cc
index f924cc7..b9ecf0a 100644
--- a/chrome/browser/defaults.cc
+++ b/chrome/browser/defaults.cc
@@ -26,7 +26,7 @@ const bool kSizeTabButtonToTopOfTabStrip = true;
const bool kBootstrapSyncAuthentication = true;
const bool kShowOtherBrowsersInAboutMemory = false;
-#elif defined(OS_LINUX)
+#elif defined(TOOLKIT_USES_GTK)
// 13.4px = 10pt @ 96dpi.
const double kAutocompleteEditFontPixelSize = 13.4;
diff --git a/chrome/browser/defaults.h b/chrome/browser/defaults.h
index ad6d634..67497c8 100644
--- a/chrome/browser/defaults.h
+++ b/chrome/browser/defaults.h
@@ -12,7 +12,7 @@
namespace browser_defaults {
-#if defined(OS_LINUX)
+#if defined(USE_X11)
// Size of the font in pixels used in the autocomplete box for normal windows.
extern const double kAutocompleteEditFontPixelSize;
diff --git a/chrome/browser/diagnostics/diagnostics_model.cc b/chrome/browser/diagnostics/diagnostics_model.cc
index aa66015..0fb53fc 100644
--- a/chrome/browser/diagnostics/diagnostics_model.cc
+++ b/chrome/browser/diagnostics/diagnostics_model.cc
@@ -108,10 +108,10 @@ class DiagnosticsModelMac : public DiagnosticsModelImpl {
DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelMac);
};
-#elif defined(OS_LINUX)
-class DiagnosticsModelLinux : public DiagnosticsModelImpl {
+#elif defined(OS_POSIX)
+class DiagnosticsModelPosix : public DiagnosticsModelImpl {
public:
- DiagnosticsModelLinux() {
+ DiagnosticsModelPosix() {
tests_.push_back(MakeInstallTypeTest());
tests_.push_back(MakeUserDirTest());
tests_.push_back(MakeLocalStateFileTest());
@@ -121,7 +121,7 @@ class DiagnosticsModelLinux : public DiagnosticsModelImpl {
}
private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelLinux);
+ DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelPosix);
};
#endif
@@ -133,7 +133,7 @@ DiagnosticsModel* MakeDiagnosticsModel() {
return new DiagnosticsModelWin();
#elif defined(OS_MACOSX)
return new DiagnosticsModelMac();
-#elif defined(OS_LINUX)
- return new DiagnosticsModelLinux();
+#elif defined(OS_POSIX)
+ return new DiagnosticsModelPosix();
#endif
}
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 1519581..ef9faae 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -159,12 +159,12 @@ void ExtensionHost::CreateView(Browser* browser) {
// We own |view_|, so don't auto delete when it's removed from the view
// hierarchy.
view_->set_parent_owned(false);
-#elif defined(OS_LINUX)
- view_.reset(new ExtensionViewGtk(this, browser));
- view_->Init();
#elif defined(OS_MACOSX)
view_.reset(new ExtensionViewMac(this, browser));
view_->Init();
+#elif defined(TOOLKIT_USES_GTK)
+ view_.reset(new ExtensionViewGtk(this, browser));
+ view_->Init();
#else
// TODO(port)
NOTREACHED();
@@ -450,11 +450,11 @@ gfx::NativeWindow ExtensionHost::GetMessageBoxRootWindow() {
return platform_util::GetTopLevel(native_view);
// Otherwise, try the active tab's view.
- TabContents* active_tab = GetBrowser()->GetSelectedTabContents();
- if (active_tab)
- return active_tab->view()->GetTopLevelNativeWindow();
-
- return NULL;
+ TabContents* active_tab = GetBrowser()->GetSelectedTabContents();
+ if (active_tab)
+ return active_tab->view()->GetTopLevelNativeWindow();
+
+ return NULL;
}
void ExtensionHost::OnMessageBoxClosed(IPC::Message* reply_msg,
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 38f6dbe..a5a0ae0 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -16,10 +16,10 @@
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#if defined(TOOLKIT_VIEWS)
#include "chrome/browser/views/extensions/extension_view.h"
-#elif defined(OS_LINUX)
-#include "chrome/browser/gtk/extension_view_gtk.h"
#elif defined(OS_MACOSX)
#include "chrome/browser/cocoa/extension_view_mac.h"
+#elif defined(TOOLKIT_GTK)
+#include "chrome/browser/gtk/extension_view_gtk.h"
#endif
#include "chrome/common/notification_registrar.h"
@@ -56,10 +56,10 @@ class ExtensionHost : public ExtensionPopupHost::PopupDelegate,
#if defined(TOOLKIT_VIEWS)
void set_view(ExtensionView* view) { view_.reset(view); }
ExtensionView* view() const { return view_.get(); }
-#elif defined(OS_LINUX)
- ExtensionViewGtk* view() const { return view_.get(); }
#elif defined(OS_MACOSX)
ExtensionViewMac* view() const { return view_.get(); }
+#elif defined(TOOLKIT_GTK)
+ ExtensionViewGtk* view() const { return view_.get(); }
#else
// TODO(port): implement
void* view() const { return NULL; }
@@ -224,10 +224,10 @@ class ExtensionHost : public ExtensionPopupHost::PopupDelegate,
// Optional view that shows the rendered content in the UI.
#if defined(TOOLKIT_VIEWS)
scoped_ptr<ExtensionView> view_;
-#elif defined(OS_LINUX)
- scoped_ptr<ExtensionViewGtk> view_;
#elif defined(OS_MACOSX)
scoped_ptr<ExtensionViewMac> view_;
+#elif defined(TOOLKIT_GTK)
+ scoped_ptr<ExtensionViewGtk> view_;
#endif
// The host for our HTML content.
diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h
index a954274..da15739 100644
--- a/chrome/browser/icon_loader.h
+++ b/chrome/browser/icon_loader.h
@@ -73,8 +73,8 @@ class IconLoader : public base::RefCountedThreadSafe<IconLoader> {
Delegate* delegate_;
-#if defined(OS_LINUX)
- // On Linux we use gdk's pixbuf loader, which has to execute on the UI
+#if defined(TOOLKIT_USES_GTK)
+ // On X11 we use gdk's pixbuf loader, which has to execute on the UI
// thread, so we only read the file on the background thread and parse it
// on the main thread.
void ParseIcon();
diff --git a/chrome/browser/importer/firefox_profile_lock.cc b/chrome/browser/importer/firefox_profile_lock.cc
index 4503d64..ca6935c 100644
--- a/chrome/browser/importer/firefox_profile_lock.cc
+++ b/chrome/browser/importer/firefox_profile_lock.cc
@@ -52,17 +52,17 @@
* ***** END LICENSE BLOCK ***** */
// static
-#if defined(OS_LINUX)
-// http://www.google.com/codesearch/p?hl=en#e_ObwTAVPyo/profile/dirserviceprovider/src/nsProfileLock.cpp&l=433
+#if defined(OS_MACOSX)
const FilePath::CharType* FirefoxProfileLock::kLockFileName =
FILE_PATH_LITERAL(".parentlock");
const FilePath::CharType* FirefoxProfileLock::kOldLockFileName =
- FILE_PATH_LITERAL("lock");
-#elif defined(OS_MACOSX)
+ FILE_PATH_LITERAL("parent.lock");
+#elif defined(OS_POSIX)
+// http://www.google.com/codesearch/p?hl=en#e_ObwTAVPyo/profile/dirserviceprovider/src/nsProfileLock.cpp&l=433
const FilePath::CharType* FirefoxProfileLock::kLockFileName =
FILE_PATH_LITERAL(".parentlock");
const FilePath::CharType* FirefoxProfileLock::kOldLockFileName =
- FILE_PATH_LITERAL("parent.lock");
+ FILE_PATH_LITERAL("lock");
#else
const FilePath::CharType* FirefoxProfileLock::kLockFileName =
FILE_PATH_LITERAL("parent.lock");
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index e903f77..d257d63 100644
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -30,10 +30,10 @@
#include "app/win_util.h"
#include "chrome/browser/views/importer_lock_view.h"
#include "views/window/window.h"
-#elif defined(OS_LINUX)
-#include "chrome/browser/gtk/import_lock_dialog_gtk.h"
#elif defined(OS_MACOSX)
#include "chrome/browser/cocoa/importer_lock_dialog.h"
+#elif defined(TOOLKIT_USES_GTK)
+#include "chrome/browser/gtk/import_lock_dialog_gtk.h"
#endif
using webkit_glue::PasswordForm;
@@ -456,7 +456,7 @@ void ImporterHost::ShowWarningDialog() {
#if defined(OS_WIN)
views::Window::CreateChromeWindow(GetActiveWindow(), gfx::Rect(),
new ImporterLockView(this))->Show();
-#elif defined(OS_LINUX)
+#elif defined(TOOLKIT_USES_GTK)
ImportLockDialogGtk::Show(parent_window_, this);
#else
ImportLockDialogCocoa::ShowWarning(this);
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc
index 4c81d7b..e8256f6 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -21,7 +21,7 @@
#include "chrome/browser/chrome_thread.h"
#include "chrome/common/chrome_switches.h"
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
#include "chrome/browser/gtk/gtk_util.h"
#endif
@@ -175,7 +175,7 @@ class JankObserver : public base::RefCountedThreadSafe<JankObserver>,
virtual void DidProcessMessage(const MSG& msg) {
EndProcessingTimers();
}
-#elif defined(OS_LINUX)
+#elif defined(TOOLKIT_USES_GTK)
virtual void WillProcessEvent(GdkEvent* event) {
begin_process_message_ = TimeTicks::Now();
// TODO(evanm): we want to set queueing_time_ using
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 6250837..7772eb3 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -45,7 +45,7 @@
#include "webkit/glue/plugins/plugin_constants_win.h"
#endif
-#if defined(OS_LINUX)
+#if defined(USE_X11)
#include "app/gfx/gtk_native_view_id_manager.h"
#endif
@@ -281,13 +281,13 @@ void PluginProcessHost::AddWindow(HWND window) {
#endif // defined(OS_WIN)
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
void PluginProcessHost::OnMapNativeViewId(gfx::NativeViewId id,
gfx::PluginWindowHandle* output) {
*output = 0;
Singleton<GtkNativeViewManager>()->GetXIDForId(output, id);
}
-#endif // defined(OS_LINUX)
+#endif // defined(TOOLKIT_USES_GTK)
PluginProcessHost::PluginProcessHost()
: ChildProcessHost(
@@ -481,7 +481,7 @@ void PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
OnPluginWindowDestroyed)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_DownloadUrl, OnDownloadUrl)
#endif
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_MapNativeViewId,
OnMapNativeViewId)
#endif
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 76c9c22..d182f45 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -52,7 +52,7 @@ class ProcessSingleton : public NonThreadSafe {
// first one, so this function won't find it.
NotifyResult NotifyOtherProcess();
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Exposed for testing. We use a timeout on Linux, and in tests we want
// this timeout to be short.
NotifyResult NotifyOtherProcessWithTimeout(const CommandLine& command_line,
@@ -87,7 +87,7 @@ class ProcessSingleton : public NonThreadSafe {
}
private:
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if !defined(OS_MACOSX)
// Timeout for the current browser process to respond. 20 seconds should be
// enough. It's only used in Windows and Linux implementations.
static const int kTimeoutInSeconds = 20;
@@ -116,7 +116,7 @@ class ProcessSingleton : public NonThreadSafe {
HWND remote_window_; // The HWND_MESSAGE of another browser.
HWND window_; // The HWND_MESSAGE window.
-#elif defined(OS_LINUX)
+#elif !defined(OS_MACOSX)
// Path in file system to the socket.
FilePath socket_path_;
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index c78b64a..dc5eb19 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -67,7 +67,7 @@
#include "net/base/transport_security_state.h"
#include "webkit/database/database_tracker.h"
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
#include "chrome/browser/gtk/gtk_theme_provider.h"
#endif
@@ -152,7 +152,7 @@ void Profile::RegisterUserPrefs(PrefService* prefs) {
IDS_SPELLCHECK_DICTIONARY);
prefs->RegisterBooleanPref(prefs::kEnableSpellCheck, true);
prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, true);
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
prefs->RegisterBooleanPref(prefs::kUsesSystemTheme, false);
#endif
prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, FilePath());
@@ -175,17 +175,17 @@ URLRequestContextGetter* Profile::GetDefaultRequestContext() {
return default_request_context_;
}
-#if defined(OS_LINUX)
-// Temporarily disabled while we figure some stuff out.
-// http://code.google.com/p/chromium/issues/detail?id=12351
-// #include "chrome/browser/password_manager/password_store_gnome.h"
-// #include "chrome/browser/password_manager/password_store_kwallet.h"
-#elif defined(OS_WIN)
+#if defined(OS_WIN)
#include "chrome/browser/password_manager/password_store_win.h"
#elif defined(OS_MACOSX)
#include "chrome/browser/keychain_mac.h"
#include "chrome/browser/password_manager/login_database_mac.h"
#include "chrome/browser/password_manager/password_store_mac.h"
+#elif defined(OS_POSIX)
+// Temporarily disabled while we figure some stuff out.
+// http://code.google.com/p/chromium/issues/detail?id=12351
+// #include "chrome/browser/password_manager/password_store_gnome.h"
+// #include "chrome/browser/password_manager/password_store_kwallet.h"
#endif
////////////////////////////////////////////////////////////////////////////////
@@ -1071,14 +1071,7 @@ void ProfileImpl::CreatePasswordStore() {
DCHECK(!created_password_store_ && password_store_.get() == NULL);
created_password_store_ = true;
scoped_refptr<PasswordStore> ps;
-#if defined(OS_LINUX)
- // TODO(evanm): implement "native" password management.
- // This bug describes the issues.
- // http://code.google.com/p/chromium/issues/detail?id=12351
- ps = new PasswordStoreDefault(GetWebDataService(Profile::IMPLICIT_ACCESS));
- if (!ps->Init())
- return;
-#elif defined(OS_WIN)
+#if defined(OS_WIN)
ps = new PasswordStoreWin(GetWebDataService(Profile::IMPLICIT_ACCESS));
#elif defined(OS_MACOSX)
FilePath login_db_file_path = GetPath();
@@ -1090,6 +1083,13 @@ void ProfileImpl::CreatePasswordStore() {
return;
}
ps = new PasswordStoreMac(new MacKeychain(), login_db);
+#elif defined(OS_POSIX)
+ // TODO(evanm): implement "native" password management.
+ // This bug describes the issues.
+ // http://code.google.com/p/chromium/issues/detail?id=12351
+ ps = new PasswordStoreDefault(GetWebDataService(Profile::IMPLICIT_ACCESS));
+ if (!ps->Init())
+ return;
#else
NOTIMPLEMENTED();
#endif
@@ -1127,7 +1127,7 @@ PersonalDataManager* ProfileImpl::GetPersonalDataManager() {
void ProfileImpl::InitThemes() {
if (!created_theme_provider_) {
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
theme_provider_.reset(new GtkThemeProvider);
#else
theme_provider_.reset(new BrowserThemeProvider);
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index c288713..65b6469 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -486,17 +486,16 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) {
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(ViewHostMsg_DuplicateSection, OnDuplicateSection)
#endif
-#if defined(OS_LINUX)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_AllocateTempFileForPrinting,
- OnAllocateTempFileForPrinting)
- IPC_MESSAGE_HANDLER(ViewHostMsg_TempFileForPrintingWritten,
- OnTempFileForPrintingWritten)
-#endif
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(ViewHostMsg_AllocatePDFTransport,
OnAllocateSharedMemoryBuffer)
IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateSharedMemoryBuffer,
OnAllocateSharedMemoryBuffer)
+#elif defined(OS_POSIX)
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_AllocateTempFileForPrinting,
+ OnAllocateTempFileForPrinting)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_TempFileForPrintingWritten,
+ OnTempFileForPrintingWritten)
#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_ResourceTypeStats, OnResourceTypeStats)
IPC_MESSAGE_HANDLER(ViewHostMsg_V8HeapStats, OnV8HeapStats)
@@ -855,9 +854,9 @@ void ResourceMessageFilter::OnClipboardWriteObjectsAsync(
new WriteClipboardTask(long_living_objects));
}
-#if !defined(OS_LINUX)
-// On non-Linux platforms, clipboard actions can be performed on the IO thread.
-// On Linux, since the clipboard is linked with GTK, we either have to do this
+#if !defined(USE_X11)
+// On non-X11 platforms, clipboard actions can be performed on the IO thread.
+// On X11, since the clipboard is linked with GTK, we either have to do this
// with GTK on the UI thread, or with Xlib on the BACKGROUND_X11 thread. In an
// ideal world, we would do the latter. However, for now we're going to
// terminate these calls on the UI thread. This risks deadlock in the case of
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index 6eabad6..96e1dea 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -68,7 +68,7 @@ class ShellIntegration {
static std::string GetCommandLineArgumentsCommon(const GURL& url,
const string16& extension_app_id);
-#if defined(OS_LINUX)
+#if defined(USE_X11)
static bool GetDesktopShortcutTemplate(std::string* output);
// Returns filename for .desktop file based on |url|, sanitized for security.
@@ -84,7 +84,7 @@ class ShellIntegration {
static void CreateDesktopShortcut(const ShortcutInfo& shortcut_info,
const std::string& shortcut_template);
-#endif // defined(OS_LINUX)
+#endif // defined(USE_X11)
#if defined(OS_WIN)
// Generates Win7 app id for given app name and profile path. The returned app
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 63dbe73..e158cf53 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -232,6 +232,10 @@ std::string MakeUserAgentForSyncapi() {
user_agent += "WIN ";
#elif defined(OS_LINUX)
user_agent += "LINUX ";
+#elif defined(OS_FREEBSD)
+ user_agent += "FREEBSD ";
+#elif defined(OS_OPENBSD)
+ user_agent += "OPENBSD ";
#elif defined(OS_MACOSX)
user_agent += "MAC ";
#endif
diff --git a/chrome/browser/tab_contents/constrained_window.h b/chrome/browser/tab_contents/constrained_window.h
index 0eaec2a..be03a1c 100644
--- a/chrome/browser/tab_contents/constrained_window.h
+++ b/chrome/browser/tab_contents/constrained_window.h
@@ -14,12 +14,12 @@ namespace views {
class WindowDelegate;
}
typedef views::WindowDelegate ConstrainedWindowDelegate;
-#elif defined(OS_LINUX)
-class ConstrainedWindowGtkDelegate;
-typedef ConstrainedWindowGtkDelegate ConstrainedWindowDelegate;
#elif defined(OS_MACOSX)
class ConstrainedWindowMacDelegate;
typedef ConstrainedWindowMacDelegate ConstrainedWindowDelegate;
+#elif defined(TOOLKIT_USES_GTK)
+class ConstrainedWindowGtkDelegate;
+typedef ConstrainedWindowGtkDelegate ConstrainedWindowDelegate;
#endif
class TabContents;
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 0f00ae3..c935519 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -680,7 +680,7 @@ class TabContents : public PageNavigator,
friend class TabContentsViewWin;
#elif defined(OS_MACOSX)
friend class TabContentsViewMac;
-#elif defined(OS_LINUX)
+#elif defined(TOOLKIT_USES_GTK)
friend class TabContentsViewGtk;
#endif