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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 6648002: Make DBUS an optional dependency so Chromium can be built without it.... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/linux/system.gyp ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "ui/base/resource/resource_bundle.h" 111 #include "ui/base/resource/resource_bundle.h"
112 #include "ui/base/system_monitor/system_monitor.h" 112 #include "ui/base/system_monitor/system_monitor.h"
113 #include "ui/gfx/gfx_module.h" 113 #include "ui/gfx/gfx_module.h"
114 114
115 #if defined(USE_LINUX_BREAKPAD) 115 #if defined(USE_LINUX_BREAKPAD)
116 #include "base/linux_util.h" 116 #include "base/linux_util.h"
117 #include "chrome/app/breakpad_linux.h" 117 #include "chrome/app/breakpad_linux.h"
118 #endif 118 #endif
119 119
120 #if defined(OS_POSIX) && !defined(OS_MACOSX) 120 #if defined(OS_POSIX) && !defined(OS_MACOSX)
121 #if defined(USE_DBUS)
121 #include <dbus/dbus-glib.h> 122 #include <dbus/dbus-glib.h>
123 #endif
122 #include "chrome/browser/browser_main_gtk.h" 124 #include "chrome/browser/browser_main_gtk.h"
123 #include "chrome/browser/ui/gtk/gtk_util.h" 125 #include "chrome/browser/ui/gtk/gtk_util.h"
124 #endif 126 #endif
125 127
126 #if defined(OS_CHROMEOS) 128 #if defined(OS_CHROMEOS)
127 #include "chrome/browser/chromeos/boot_times_loader.h" 129 #include "chrome/browser/chromeos/boot_times_loader.h"
128 #include "chrome/browser/oom_priority_manager.h" 130 #include "chrome/browser/oom_priority_manager.h"
129 #endif 131 #endif
130 132
131 // TODO(port): several win-only methods have been pulled out of this, but 133 // TODO(port): several win-only methods have been pulled out of this, but
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 // check is actually equivalent and sufficient to work around the 921 // check is actually equivalent and sufficient to work around the
920 // error. 922 // error.
921 if (!g_thread_supported()) 923 if (!g_thread_supported())
922 g_thread_init(NULL); 924 g_thread_init(NULL);
923 // Glib type system initialization. Needed at least for gconf, 925 // Glib type system initialization. Needed at least for gconf,
924 // used in net/proxy/proxy_config_service_linux.cc. Most likely 926 // used in net/proxy/proxy_config_service_linux.cc. Most likely
925 // this is superfluous as gtk_init() ought to do this. It's 927 // this is superfluous as gtk_init() ought to do this. It's
926 // definitely harmless, so retained as a reminder of this 928 // definitely harmless, so retained as a reminder of this
927 // requirement for gconf. 929 // requirement for gconf.
928 g_type_init(); 930 g_type_init();
931
932 #if defined(USE_DBUS)
929 // We use glib-dbus for geolocation and it's possible other libraries 933 // We use glib-dbus for geolocation and it's possible other libraries
930 // (e.g. gnome-keyring) will use it, so initialize its threading here 934 // (e.g. gnome-keyring) will use it, so initialize its threading here
931 // as well. 935 // as well.
932 dbus_g_thread_init(); 936 dbus_g_thread_init();
937 #endif
938
933 gfx::GtkInitFromCommandLine(parameters.command_line_); 939 gfx::GtkInitFromCommandLine(parameters.command_line_);
934 SetUpGLibLogHandler(); 940 SetUpGLibLogHandler();
935 #endif 941 #endif
936 942
937 #if defined(TOOLKIT_GTK) 943 #if defined(TOOLKIT_GTK)
938 // It is important for this to happen before the first run dialog, as it 944 // It is important for this to happen before the first run dialog, as it
939 // styles the dialog as well. 945 // styles the dialog as well.
940 gtk_util::InitRCStyles(); 946 gtk_util::InitRCStyles();
941 #endif 947 #endif
942 948
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 #if defined(OS_CHROMEOS) 1874 #if defined(OS_CHROMEOS)
1869 // To be precise, logout (browser shutdown) is not yet done, but the 1875 // To be precise, logout (browser shutdown) is not yet done, but the
1870 // remaining work is negligible, hence we say LogoutDone here. 1876 // remaining work is negligible, hence we say LogoutDone here.
1871 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1877 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1872 false); 1878 false);
1873 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1879 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1874 #endif 1880 #endif
1875 TRACE_EVENT_END("BrowserMain", 0, 0); 1881 TRACE_EVENT_END("BrowserMain", 0, 0);
1876 return result_code; 1882 return result_code;
1877 } 1883 }
OLDNEW
« no previous file with comments | « build/linux/system.gyp ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698