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

Side by Side Diff: Source/platform/JSONValues.h

Issue 1167793003: Escape all of invalid values in console messages for INPUT elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « Source/core/html/forms/TimeInputType.cpp ('k') | Source/platform/JSONValues.cpp » ('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 (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual bool asObject(RefPtr<JSONObject>* output); 110 virtual bool asObject(RefPtr<JSONObject>* output);
111 virtual bool asArray(RefPtr<JSONArray>* output); 111 virtual bool asArray(RefPtr<JSONArray>* output);
112 virtual PassRefPtr<JSONObject> asObject(); 112 virtual PassRefPtr<JSONObject> asObject();
113 virtual PassRefPtr<JSONArray> asArray(); 113 virtual PassRefPtr<JSONArray> asArray();
114 114
115 String toJSONString() const; 115 String toJSONString() const;
116 String toPrettyJSONString() const; 116 String toPrettyJSONString() const;
117 virtual void writeJSON(StringBuilder* output) const; 117 virtual void writeJSON(StringBuilder* output) const;
118 virtual void prettyWriteJSON(StringBuilder* output) const; 118 virtual void prettyWriteJSON(StringBuilder* output) const;
119 119
120 static String quoteString(const String&);
121
120 protected: 122 protected:
121 explicit JSONValue(Type type) : m_type(type) { } 123 explicit JSONValue(Type type) : m_type(type) { }
122 virtual void prettyWriteJSONInternal(StringBuilder* output, int depth) const ; 124 virtual void prettyWriteJSONInternal(StringBuilder* output, int depth) const ;
123 125
124 private: 126 private:
125 friend class JSONObjectBase; 127 friend class JSONObjectBase;
126 friend class JSONArrayBase; 128 friend class JSONArrayBase;
127 129
128 Type m_type; 130 Type m_type;
129 }; 131 };
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 342
341 using JSONArrayBase::get; 343 using JSONArrayBase::get;
342 344
343 using JSONArrayBase::begin; 345 using JSONArrayBase::begin;
344 using JSONArrayBase::end; 346 using JSONArrayBase::end;
345 }; 347 };
346 348
347 } // namespace blink 349 } // namespace blink
348 350
349 #endif // JSONValues_h 351 #endif // JSONValues_h
OLDNEW
« no previous file with comments | « Source/core/html/forms/TimeInputType.cpp ('k') | Source/platform/JSONValues.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698