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

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

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 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
« no previous file with comments | « cc/resources/raster_mode.h ('k') | cc/resources/tile.h » ('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 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 std::string RasterModeToString(RasterMode raster_mode) {
14 switch (raster_mode) { 14 switch (raster_mode) {
15 case HIGH_QUALITY_RASTER_MODE: 15 case HIGH_QUALITY_RASTER_MODE:
16 return scoped_ptr<base::Value>( 16 return "HIGH_QUALITY_RASTER_MODE";
17 new base::StringValue("HIGH_QUALITY_RASTER_MODE"));
18 case LOW_QUALITY_RASTER_MODE: 17 case LOW_QUALITY_RASTER_MODE:
19 return scoped_ptr<base::Value>( 18 return "LOW_QUALITY_RASTER_MODE";
20 new base::StringValue("LOW_QUALITY_RASTER_MODE"));
21 default: 19 default:
22 NOTREACHED() << "Unrecognized RasterMode value " << raster_mode; 20 NOTREACHED() << "Unrecognized RasterMode value " << raster_mode;
23 return scoped_ptr<base::Value>( 21 return "<unknown RasterMode value>";
24 new base::StringValue("<unknown RasterMode value>"));
25 } 22 }
26 } 23 }
27 24
28 } // namespace cc 25 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_mode.h ('k') | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698