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

Unified Diff: chromeos/display/output_configurator.cc

Issue 23619015: chromeos: Avoid useless warning on lookup of display mode 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update return value Created 7 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/display/output_configurator.cc
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
index 4e8f2a861c180f430b144d131a2c32a3c635ee09..78cb31869d4bca60403cbc4c4909b547e95d431a 100644
--- a/chromeos/display/output_configurator.cc
+++ b/chromeos/display/output_configurator.cc
@@ -169,6 +169,9 @@ bool OutputConfigurator::TestApi::TriggerConfigureTimeout() {
const OutputConfigurator::ModeInfo* OutputConfigurator::GetModeInfo(
const OutputSnapshot& output,
RRMode mode) {
+ if (mode == None)
+ return NULL;
+
std::map<RRMode, ModeInfo>::const_iterator it = output.mode_infos.find(mode);
if (it == output.mode_infos.end()) {
LOG(WARNING) << "Unable to find info about mode " << mode
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698