| Index: ui/devtools/string_util.cc
|
| diff --git a/ui/devtools/string_util.cc b/ui/devtools/string_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..efc3180f0472123731a10cc13496f49a4fcb8d6d
|
| --- /dev/null
|
| +++ b/ui/devtools/string_util.cc
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/devtools/string_util.h"
|
| +
|
| +#include "base/strings/string_util.h"
|
| +#include "ui/devtools/Protocol.h"
|
| +
|
| +namespace ui {
|
| +namespace devtools {
|
| +namespace protocol {
|
| +
|
| +std::unique_ptr<Value> parseJSON(const String& string) {
|
| + DCHECK(base::IsStringUTF8(string));
|
| + // TODO(mhashmi): 16-bit strings need to be handled
|
| + return parseJSON(reinterpret_cast<const uint8_t*>(&string[0]),
|
| + string.length());
|
| +};
|
| +
|
| +} // namespace protocol
|
| +} // namespace ws
|
| +} // namespace ui
|
|
|