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

Unified Diff: content/browser/devtools/protocol_string.h

Issue 2500093002: [DevTools] Move IO and Tracing to new generator. (Closed)
Patch Set: roll 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/protocol_config.json ('k') | content/browser/devtools/protocol_string.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol_string.h
diff --git a/content/browser/devtools/protocol_string.h b/content/browser/devtools/protocol_string.h
index 8541aba1ae746acf9f361f503a3166acdc895014..1d3d2edf13478fbbcd59d01e783e42870dfbf412 100644
--- a/content/browser/devtools/protocol_string.h
+++ b/content/browser/devtools/protocol_string.h
@@ -13,6 +13,10 @@
#include "base/strings/string_number_conversions.h"
#include "content/common/content_export.h"
+namespace base {
+class Value;
+}
+
namespace content {
namespace protocol {
@@ -43,7 +47,10 @@ class CONTENT_EXPORT StringUtil {
return base::IntToString(number);
}
static String fromDouble(double number) {
- return base::DoubleToString(number);
+ String s = base::DoubleToString(number);
+ if (!s.empty() && s[0] == '.')
+ s = "0" + s;
+ return s;
}
static const size_t kNotFound = static_cast<size_t>(-1);
static void builderReserve(StringBuilder& builder, unsigned capacity) {
@@ -52,6 +59,10 @@ class CONTENT_EXPORT StringUtil {
static std::unique_ptr<protocol::Value> parseJSON(const String&);
};
+std::unique_ptr<protocol::Value> toProtocolValue(
+ const base::Value* value, int depth);
+std::unique_ptr<base::Value> toBaseValue(protocol::Value* value, int depth);
+
} // namespace protocol
} // namespace content
« no previous file with comments | « content/browser/devtools/protocol_config.json ('k') | content/browser/devtools/protocol_string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698