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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 159753: Linux: Fix Valgrind error in VisitedLinkEventsTest.Coalescense. (Closed)
Patch Set: Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/x11_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.cc
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index e4f7155a6cca3c7a2ee6adc222e0cd573cbf75ca..ccfc556fa0bd058f12d40e9aa996b8d253474145 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -1194,8 +1194,12 @@ GtkWindow* BrowserWindowGtk::GetBrowserWindowForXID(XID xid) {
// static
void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) {
bool custom_frame_default = false;
- if (!prefs->HasPrefPath(prefs::kUseCustomChromeFrame))
+ // Avoid checking the window manager if we're not connected to an X server (as
+ // is the case in Valgrind tests).
+ if (x11_util::XDisplayExists() &&
+ !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) {
custom_frame_default = GetCustomFramePrefDefault();
+ }
prefs->RegisterBooleanPref(
prefs::kUseCustomChromeFrame, custom_frame_default);
}
« no previous file with comments | « no previous file | chrome/common/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698