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

Side by Side Diff: experimental/PdfViewer/SkPdfReporter.cpp

Issue 26912005: mode code cleanup (100c / l, comments) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 2 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 | « experimental/PdfViewer/SkPdfReporter.h ('k') | experimental/PdfViewer/SkPdfUtils.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 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "SkPdfReporter.h" 9 #include "SkPdfReporter.h"
10 10
(...skipping 12 matching lines...) Expand all
23 if (0 <= sev && sev < _kCount__SkPdfIssueSeverity) { 23 if (0 <= sev && sev < _kCount__SkPdfIssueSeverity) {
24 return severityName[sev]; 24 return severityName[sev];
25 } 25 }
26 SkASSERT(false); 26 SkASSERT(false);
27 return "UNKOWN SEVERITY"; 27 return "UNKOWN SEVERITY";
28 } 28 }
29 29
30 // TODO(edisonn): add a flag to set the minimum warning level 30 // TODO(edisonn): add a flag to set the minimum warning level
31 31
32 #ifdef PDF_REPORT 32 #ifdef PDF_REPORT
33 void SkPdfReport( SkPdfIssueSeverity sev, SkPdfIssue issue, const char* context, const SkPdfNativeObject* obj, SkPdfContext* pdfCo ntext) { 33 void SkPdfReport(SkPdfIssueSeverity sev, SkPdfIssue issue,
34 const char* context,
35 const SkPdfNativeObject* obj,
36 SkPdfContext* pdfContext) {
34 if (sev >= kIgnoreError_SkPdfIssueSeverity) { 37 if (sev >= kIgnoreError_SkPdfIssueSeverity) {
35 printf("%s: %s\n", getSeverityName(sev), context); 38 printf("%s: %s\n", getSeverityName(sev), context);
36 } 39 }
37 } 40 }
38 41
39 void SkPdfReportUnexpectedType(SkPdfIssueSeverity sev, const char* context, cons t SkPdfNativeObject* obj, int anyOfTypes, SkPdfContext* pdfContext) { 42 void SkPdfReportIf(bool report,
43 SkPdfIssueSeverity sev, SkPdfIssue issue,
44 const char* context,
45 const SkPdfNativeObject* obj,
46 SkPdfContext* pdfContext) {
47 if (!report) {
48 return;
49 }
50 SkPdfReport(sev, issue, context, obj, pdfContext);
51 }
52
53 void SkPdfReportUnexpectedType(SkPdfIssueSeverity sev,
54 const char* context,
55 const SkPdfNativeObject* obj,
56 int anyOfTypes, SkPdfContext* pdfContext) {
40 if (sev >= kIgnoreError_SkPdfIssueSeverity) { 57 if (sev >= kIgnoreError_SkPdfIssueSeverity) {
41 printf("%s: %s\n", getSeverityName(sev), context); 58 printf("%s: %s\n", getSeverityName(sev), context);
42 } 59 }
43 } 60 }
44 61
45 void SkPdfReportIf(bool report, SkPdfIssueSeverity sev, SkPdfIssue issue, const char* context, const SkPdfNativeObject* obj, SkPdfContext* pdfCo ntext) {
46 if (!report) {
47 return;
48 }
49 SkPdfReport(sev, issue, context, obj, pdfContext);
50 }
51 #endif // PDF_REPORT 62 #endif // PDF_REPORT
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfReporter.h ('k') | experimental/PdfViewer/SkPdfUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698