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

Side by Side Diff: net/spdy/hpack_string_util.cc

Issue 138243003: Implement basic classes for HPACK (HTTP/2 compression) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And removing tabs from net.gyp... Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #include "net/spdy/hpack_string_util.h"
2
3 #include "base/basictypes.h"
4
5 namespace net {
6
7 bool StringPiecesEqualConstantTime(base::StringPiece str1,
8 base::StringPiece str2) {
9 size_t size = str1.size();
10 if (str2.size() != size)
11 return false;
12
13 uint8 x = 0;
14 for (size_t i = 0; i < size; ++i) {
15 x |= str1[i] ^ str2[i];
16 }
17 return x == 0;
18 }
19
20 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698