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

Unified Diff: components/ui_devtools/string_util.h

Issue 2846113002: Roll third_party/inspector_protocol to efefa86c3183d307f0a0e53bf568fe57c5b58849 (Closed)
Patch Set: updated README.chromium 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
« no previous file with comments | « no previous file | content/browser/devtools/protocol_string.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ui_devtools/string_util.h
diff --git a/components/ui_devtools/string_util.h b/components/ui_devtools/string_util.h
index 4efb835380f6a18569a0e54b06ca8fae1f7f9232..d08b8b6f22f68474b50ba3115e63e129d4e8e7bc 100644
--- a/components/ui_devtools/string_util.h
+++ b/components/ui_devtools/string_util.h
@@ -45,6 +45,11 @@ class StringUtil {
static String fromDouble(double number) {
return base::DoubleToString(number);
}
+ static double toDouble(const char* s, size_t len, bool* ok) {
+ double v = 0.0;
+ *ok = base::StringToDouble(std::string(s, len), &v);
+ return *ok ? v : 0.0;
+ }
static void builderAppend(StringBuilder& builder, const String& s) {
builder.append(s);
}
« no previous file with comments | « no previous file | content/browser/devtools/protocol_string.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698