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

Side by Side Diff: cc/resources/raster_mode.cc

Issue 22875045: cc: Remove unnecessary "default" cases from switch statements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove changes to enums that require arraysize Created 7 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/raster_mode.h" 5 #include "cc/resources/raster_mode.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 scoped_ptr<base::Value> RasterModeAsValue(RasterMode raster_mode) { 13 scoped_ptr<base::Value> RasterModeAsValue(RasterMode raster_mode) {
14 switch (raster_mode) { 14 switch (raster_mode) {
15 case HIGH_QUALITY_NO_LCD_RASTER_MODE: 15 case HIGH_QUALITY_NO_LCD_RASTER_MODE:
16 return scoped_ptr<base::Value>( 16 return scoped_ptr<base::Value>(
17 base::Value::CreateStringValue("HIGH_QUALITY_NO_LCD_RASTER_MODE")); 17 base::Value::CreateStringValue("HIGH_QUALITY_NO_LCD_RASTER_MODE"));
18 case HIGH_QUALITY_RASTER_MODE: 18 case HIGH_QUALITY_RASTER_MODE:
19 return scoped_ptr<base::Value>( 19 return scoped_ptr<base::Value>(
20 base::Value::CreateStringValue("HIGH_QUALITY_RASTER_MODE")); 20 base::Value::CreateStringValue("HIGH_QUALITY_RASTER_MODE"));
21 case LOW_QUALITY_RASTER_MODE: 21 case LOW_QUALITY_RASTER_MODE:
22 return scoped_ptr<base::Value>( 22 return scoped_ptr<base::Value>(
23 base::Value::CreateStringValue("LOW_QUALITY_RASTER_MODE")); 23 base::Value::CreateStringValue("LOW_QUALITY_RASTER_MODE"));
24 case NUM_RASTER_MODES:
25 default: 24 default:
vmpstr 2013/08/26 15:38:30 I think this can also be removed with NOTREACHED a
reveman 2013/08/26 17:16:57 We need it as NUM_RASTER_MODES still exists.
vmpstr 2013/08/26 17:19:17 Ah, my bad. I confused this with NUM_MODES that yo
26 NOTREACHED() << "Unrecognized RasterMode value " << raster_mode; 25 NOTREACHED() << "Unrecognized RasterMode value " << raster_mode;
27 return scoped_ptr<base::Value>( 26 return scoped_ptr<base::Value>(
28 base::Value::CreateStringValue("<unknown RasterMode value>")); 27 base::Value::CreateStringValue("<unknown RasterMode value>"));
29 } 28 }
30 } 29 }
31 30
32 } // namespace cc 31 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698