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

Side by Side Diff: lib/ErrorSupport_cpp.template

Issue 2495353004: [inspector_protocol] Support chromium code style. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « lib/Collections_h.template ('k') | lib/Protocol_cpp.template » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ErrorSupport.h" 5 //#include "ErrorSupport.h"
6 6
7 {% for namespace in config.protocol.namespace %} 7 {% for namespace in config.protocol.namespace %}
8 namespace {{namespace}} { 8 namespace {{namespace}} {
9 {% endfor %} 9 {% endfor %}
10 10
(...skipping 24 matching lines...) Expand all
35 builder.append('.'); 35 builder.append('.');
36 builder.append(m_path[i]); 36 builder.append(m_path[i]);
37 } 37 }
38 builder.append(": "); 38 builder.append(": ");
39 builder.append(error); 39 builder.append(error);
40 m_errors.push_back(builder.toString()); 40 m_errors.push_back(builder.toString());
41 } 41 }
42 42
43 bool ErrorSupport::hasErrors() 43 bool ErrorSupport::hasErrors()
44 { 44 {
45 return m_errors.size(); 45 return !!m_errors.size();
46 } 46 }
47 47
48 String ErrorSupport::errors() 48 String ErrorSupport::errors()
49 { 49 {
50 StringBuilder builder; 50 StringBuilder builder;
51 for (size_t i = 0; i < m_errors.size(); ++i) { 51 for (size_t i = 0; i < m_errors.size(); ++i) {
52 if (i) 52 if (i)
53 builder.append("; "); 53 builder.append("; ");
54 builder.append(m_errors[i]); 54 builder.append(m_errors[i]);
55 } 55 }
56 return builder.toString(); 56 return builder.toString();
57 } 57 }
58 58
59 {% for namespace in config.protocol.namespace %} 59 {% for namespace in config.protocol.namespace %}
60 } // namespace {{namespace}} 60 } // namespace {{namespace}}
61 {% endfor %} 61 {% endfor %}
OLDNEW
« no previous file with comments | « lib/Collections_h.template ('k') | lib/Protocol_cpp.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698