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

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

Issue 2846113002: Roll third_party/inspector_protocol to efefa86c3183d307f0a0e53bf568fe57c5b58849 (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/protocol_string.h
diff --git a/content/browser/devtools/protocol_string.h b/content/browser/devtools/protocol_string.h
index 90dbd4abf7cfb546e8cc008f9632ef5239c1a6f9..2c224290cb188ba7e99000d94b1bf234d4b9d321 100644
--- a/content/browser/devtools/protocol_string.h
+++ b/content/browser/devtools/protocol_string.h
@@ -52,6 +52,13 @@ class CONTENT_EXPORT StringUtil {
s = "0" + s;
return s;
}
+ static double toDouble(const char* s, size_t len, bool* ok) {
+ double v = 0.0;
+ *ok = base::StringToDouble(std::string(s, len), &v);
+ if (!*ok)
+ v = 0.0;
+ return v;
+ }
static size_t find(const String& s, const char* needle) {
return s.find(needle);
}

Powered by Google App Engine
This is Rietveld 408576698