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

Side by Side Diff: lib/ErrorSupport_cpp.template

Issue 2477823002: [inspector_protocol] remove old style domains support (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 | « CodeGenerator.py ('k') | lib/ErrorSupport_h.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
11 ErrorSupport::ErrorSupport() : m_errorString(nullptr) { } 11 ErrorSupport::ErrorSupport() { }
12 ErrorSupport::ErrorSupport(String* errorString) : m_errorString(errorString) { } 12 ErrorSupport::~ErrorSupport() { }
13 ErrorSupport::~ErrorSupport()
14 {
15 if (m_errorString && hasErrors()) {
16 StringBuilder builder;
17 builder.append("Internal error(s): ");
18 builder.append(errors());
19 *m_errorString = builder.toString();
20 }
21 }
22 13
23 void ErrorSupport::setName(const String& name) 14 void ErrorSupport::setName(const String& name)
24 { 15 {
25 DCHECK(m_path.size()); 16 DCHECK(m_path.size());
26 m_path[m_path.size() - 1] = name; 17 m_path[m_path.size() - 1] = name;
27 } 18 }
28 19
29 void ErrorSupport::push() 20 void ErrorSupport::push()
30 { 21 {
31 m_path.push_back(String()); 22 m_path.push_back(String());
(...skipping 29 matching lines...) Expand all
61 if (i) 52 if (i)
62 builder.append("; "); 53 builder.append("; ");
63 builder.append(m_errors[i]); 54 builder.append(m_errors[i]);
64 } 55 }
65 return builder.toString(); 56 return builder.toString();
66 } 57 }
67 58
68 {% for namespace in config.protocol.namespace %} 59 {% for namespace in config.protocol.namespace %}
69 } // namespace {{namespace}} 60 } // namespace {{namespace}}
70 {% endfor %} 61 {% endfor %}
OLDNEW
« no previous file with comments | « CodeGenerator.py ('k') | lib/ErrorSupport_h.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698