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

Side by Side Diff: components/ui_devtools/string_util.cc

Issue 2490473004: [DevTools] Roll third_party/inspector_protocol to e23134c5aa6131e5a3a3afbefce255becce3a3bd. (Closed)
Patch Set: ui_devtools 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 unified diff | Download patch
« no previous file with comments | « components/ui_devtools/string_util.h ('k') | third_party/WebKit/Source/core/inspector/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/ui_devtools/string_util.h" 5 #include "components/ui_devtools/string_util.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "components/ui_devtools/Protocol.h" 8 #include "components/ui_devtools/Protocol.h"
9 9
10 namespace ui { 10 namespace ui {
11 namespace devtools { 11 namespace devtools {
12 namespace protocol { 12 namespace protocol {
13 13
14 std::unique_ptr<Value> parseJSON(const String& string) { 14 // static
15 std::unique_ptr<Value> StringUtil::parseJSON(const String& string) {
15 DCHECK(base::IsStringUTF8(string)); 16 DCHECK(base::IsStringUTF8(string));
16 // TODO(mhashmi): 16-bit strings need to be handled 17 // TODO(mhashmi): 16-bit strings need to be handled
17 return parseJSON(reinterpret_cast<const uint8_t*>(&string[0]), 18 return parseJSONCharacters(reinterpret_cast<const uint8_t*>(&string[0]),
18 string.length()); 19 string.length());
19 }; 20 };
20 21
21 } // namespace protocol 22 } // namespace protocol
22 } // namespace ws 23 } // namespace ws
23 } // namespace ui 24 } // namespace ui
OLDNEW
« no previous file with comments | « components/ui_devtools/string_util.h ('k') | third_party/WebKit/Source/core/inspector/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698