summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorsdoyon@chromium.org <sdoyon@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 16:50:56 +0000
committersdoyon@chromium.org <sdoyon@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-20 16:50:56 +0000
commit861c6c6d56add9157e04aa2ac43bec8e33bf1cc1 (patch)
tree835dd6466912cd073e3ac16177252fe0c8865c93 /chrome/app
parentbc1529bbafc42d96d9ac0839bcb0ba1ab9328445 (diff)
downloadchromium_src-861c6c6d56add9157e04aa2ac43bec8e33bf1cc1.zip
chromium_src-861c6c6d56add9157e04aa2ac43bec8e33bf1cc1.tar.gz
chromium_src-861c6c6d56add9157e04aa2ac43bec8e33bf1cc1.tar.bz2
ProxyConfigService for Linux.
Establishes a ProxyConfig by reading settings from gconf or consulting environment variables. BUG=8143 Thanks to ermilov.maxim@gmail.com for his contribution: some ideas< and code snippets from his patch were folded into this one. (See http://codereview.chromium.org/49009) Review URL: http://codereview.chromium.org/60009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_dll_main.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 00ee793..63658ca 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -20,8 +20,10 @@
#endif
#if defined(OS_LINUX)
-#include <string.h>
+#include <gdk/gdk.h>
+#include <glib.h>
#include <gtk/gtk.h>
+#include <string.h>
#endif
#include "base/at_exit.h"
@@ -423,6 +425,15 @@ int ChromeMain(int argc, const char** argv) {
#endif
} else if (process_type.empty()) {
#if defined(OS_LINUX)
+ // Glib/GDK type system and threading initializations. Needed at
+ // least for gconf usage in net/proxy/proxy_config_service_linux.cc.
+ // TODO(sdoyon): confirm whether gconf truly needs this. If so,
+ // the GTK main loop (message pump) must also be made to call
+ // gdk_threads_enter/leave(). Similar issue with the clipboard
+ // (estade@ deanm@).
+ g_type_init();
+ g_thread_init(NULL);
+ gdk_threads_init();
// gtk_init() can change |argc| and |argv|, but nobody else uses them.
gtk_init(&argc, const_cast<char***>(&argv));
SetUpGLibLogHandler();