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

Side by Side Diff: src/inspector/string-16.cc

Issue 2523743003: Roll third_party/inspector_protocol to 73028acaa3646789fd2a3bfd0d79eb2d91b696b3 (Closed)
Patch Set: addressed comments 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 | « src/inspector/search-util.cc ('k') | src/inspector/string-util.h » ('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 V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 "src/inspector/string-16.h" 5 #include "src/inspector/string-16.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cctype> 8 #include <cctype>
9 #include <cstdlib> 9 #include <cstdlib>
10 #include <cstring> 10 #include <cstring>
11 #include <iomanip> 11 #include <iomanip>
12 #include <limits> 12 #include <limits>
13 #include <locale> 13 #include <locale>
14 #include <sstream> 14 #include <sstream>
15 #include <string> 15 #include <string>
16 16
17 #include "src/base/platform/platform.h" 17 #include "src/base/platform/platform.h"
18 #include "src/inspector/protocol-platform.h"
19 18
20 namespace v8_inspector { 19 namespace v8_inspector {
21 20
22 namespace { 21 namespace {
23 22
24 bool isASCII(UChar c) { return !(c & ~0x7F); } 23 bool isASCII(UChar c) { return !(c & ~0x7F); }
25 24
26 bool isSpaceOrNewLine(UChar c) { 25 bool isSpaceOrNewLine(UChar c) {
27 return isASCII(c) && c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); 26 return isASCII(c) && c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9));
28 } 27 }
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // There should be room left, since one UChar hasn't been 532 // There should be room left, since one UChar hasn't been
534 // converted. 533 // converted.
535 DCHECK((buffer + 3) <= (buffer + bufferVector.size())); 534 DCHECK((buffer + 3) <= (buffer + bufferVector.size()));
536 putUTF8Triple(buffer, *characters); 535 putUTF8Triple(buffer, *characters);
537 } 536 }
538 537
539 return std::string(bufferVector.data(), buffer - bufferVector.data()); 538 return std::string(bufferVector.data(), buffer - bufferVector.data());
540 } 539 }
541 540
542 } // namespace v8_inspector 541 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/search-util.cc ('k') | src/inspector/string-util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698