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

Unified Diff: ui/display/manager/chromeos/x11/native_display_delegate_x11.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
Index: ui/display/manager/chromeos/x11/native_display_delegate_x11.cc
diff --git a/ui/display/manager/chromeos/x11/native_display_delegate_x11.cc b/ui/display/manager/chromeos/x11/native_display_delegate_x11.cc
index 5a0b4f5951c0044158a170bf8af0012509947562..fc2b528e0bde86300bc7196ba088cfd1bf8a7739 100644
--- a/ui/display/manager/chromeos/x11/native_display_delegate_x11.cc
+++ b/ui/display/manager/chromeos/x11/native_display_delegate_x11.cc
@@ -132,14 +132,16 @@ void NativeDisplayDelegateX11::Initialize() {
}
void NativeDisplayDelegateX11::GrabServer() {
- CHECK(!screen_) << "Server already grabbed";
+ // Server already grabbed
+ CHECK(!screen_);
XGrabServer(display_);
screen_.reset(XRRGetScreenResources(display_, window_));
CHECK(screen_);
}
void NativeDisplayDelegateX11::UngrabServer() {
- CHECK(screen_) << "Server not grabbed";
+ // Server not grabbed
+ CHECK(screen_);
screen_.reset();
XUngrabServer(display_);
// crbug.com/366125
@@ -171,7 +173,8 @@ void NativeDisplayDelegateX11::ForceDPMSOn() {
void NativeDisplayDelegateX11::GetDisplays(
const GetDisplaysCallback& callback) {
- CHECK(screen_) << "Server not grabbed";
+ // Server not grabbed
+ CHECK(screen_);
cached_outputs_.clear();
std::set<RRCrtc> last_used_crtcs;
@@ -194,8 +197,10 @@ void NativeDisplayDelegateX11::GetDisplays(
void NativeDisplayDelegateX11::AddMode(const DisplaySnapshot& output,
const DisplayMode* mode) {
- CHECK(screen_) << "Server not grabbed";
- CHECK(mode) << "Must add valid mode";
+ // Server not grabbed
+ CHECK(screen_);
+ // Must add valid mode
+ CHECK(mode);
const DisplaySnapshotX11& x11_output =
static_cast<const DisplaySnapshotX11&>(output);
@@ -225,7 +230,8 @@ bool NativeDisplayDelegateX11::ConfigureCrtc(RRCrtc crtc,
RROutput output,
int x,
int y) {
- CHECK(screen_) << "Server not grabbed";
+ // Server not grabbed
+ CHECK(screen_);
VLOG(1) << "ConfigureCrtc: crtc=" << crtc << " mode=" << mode
<< " output=" << output << " x=" << x << " y=" << y;
// Xrandr.h is full of lies. XRRSetCrtcConfig() is defined as returning a
@@ -244,7 +250,8 @@ bool NativeDisplayDelegateX11::ConfigureCrtc(RRCrtc crtc,
}
void NativeDisplayDelegateX11::CreateFrameBuffer(const gfx::Size& size) {
- CHECK(screen_) << "Server not grabbed";
+ // Server not grabbed
+ CHECK(screen_);
gfx::Size current_screen_size(
DisplayWidth(display_, DefaultScreen(display_)),
DisplayHeight(display_, DefaultScreen(display_)));
@@ -288,7 +295,8 @@ NativeDisplayDelegateX11::GetFakeDisplayController() {
}
void NativeDisplayDelegateX11::InitModes() {
- CHECK(screen_) << "Server not grabbed";
+ // Server not grabbed
+ CHECK(screen_);
modes_.clear();
@@ -490,7 +498,8 @@ bool NativeDisplayDelegateX11::SetHDCPState(const DisplaySnapshot& output,
}
void NativeDisplayDelegateX11::DestroyUnusedCrtcs() {
- CHECK(screen_) << "Server not grabbed";
+ // Server not grabbed
+ CHECK(screen_);
for (int i = 0; i < screen_->ncrtc; ++i) {
bool in_use = false;
@@ -512,7 +521,8 @@ void NativeDisplayDelegateX11::DestroyUnusedCrtcs() {
void NativeDisplayDelegateX11::UpdateCrtcsForNewFramebuffer(
const gfx::Size& min_screen_size) {
- CHECK(screen_) << "Server not grabbed";
+ // Server not grabbed
+ CHECK(screen_);
// Setting the screen size will fail if any CRTC doesn't fit afterwards.
// At the same time, turning CRTCs off and back on uses up a lot of time.
// This function tries to be smart to avoid too many off/on cycles:

Powered by Google App Engine
This is Rietveld 408576698