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

Side by Side Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

Issue 2543073002: Don't show a placeholder if the response contains the full image. (Closed)
Patch Set: Initial patchset Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
5 * Copyright (C) 2009 Google Inc. All rights reserved. 5 * Copyright (C) 2009 Google Inc. All rights reserved.
6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 int maxParseDepth) { 903 int maxParseDepth) {
904 StringBuilder sb; 904 StringBuilder sb;
905 sb.append("["); 905 sb.append("[");
906 sb.append(header); 906 sb.append(header);
907 sb.append("]"); 907 sb.append("]");
908 std::unique_ptr<JSONValue> headerValue = 908 std::unique_ptr<JSONValue> headerValue =
909 parseJSON(sb.toString(), maxParseDepth); 909 parseJSON(sb.toString(), maxParseDepth);
910 return JSONArray::from(std::move(headerValue)); 910 return JSONArray::from(std::move(headerValue));
911 } 911 }
912 912
913 bool parseContentRangeHeader(const String& contentRange,
914 int64_t* firstBytePosition,
915 int64_t* lastBytePosition,
916 int64_t* instanceLength) {
917 return net::HttpUtil::ParseContentRangeHeader(
918 StringUTF8Adaptor(contentRange).asStringPiece(), firstBytePosition,
919 lastBytePosition, instanceLength);
920 }
921
913 } // namespace blink 922 } // namespace blink
OLDNEW
« net/http/http_util.cc ('K') | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698