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

Side by Side Diff: content/browser/loader/mime_sniffing_resource_handler.cc

Issue 2618633004: Add support for Animated PNG (Closed)
Patch Set: Use a custom allocator in GIFImageDecoderTest Created 3 years, 9 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
« no previous file with comments | « no previous file | content/browser/loader/mime_sniffing_resource_handler_unittest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/loader/mime_sniffing_resource_handler.h" 5 #include "content/browser/loader/mime_sniffing_resource_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 29 matching lines...) Expand all
40 #include "ppapi/features/features.h" 40 #include "ppapi/features/features.h"
41 #include "url/origin.h" 41 #include "url/origin.h"
42 42
43 namespace content { 43 namespace content {
44 44
45 namespace { 45 namespace {
46 46
47 const char kAcceptHeader[] = "Accept"; 47 const char kAcceptHeader[] = "Accept";
48 const char kFrameAcceptHeader[] = 48 const char kFrameAcceptHeader[] =
49 "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp," 49 "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,"
50 "*/*;q=0.8"; 50 "image/apng,*/*;q=0.8";
scroggo_chromium 2017/03/14 18:18:53 japhet@ or kinuko@, could this change be causing t
51 const char kStylesheetAcceptHeader[] = "text/css,*/*;q=0.1"; 51 const char kStylesheetAcceptHeader[] = "text/css,*/*;q=0.1";
52 const char kImageAcceptHeader[] = "image/webp,image/*,*/*;q=0.8"; 52 const char kImageAcceptHeader[] = "image/webp,image/apng,image/*,*/*;q=0.8";
53 const char kDefaultAcceptHeader[] = "*/*"; 53 const char kDefaultAcceptHeader[] = "*/*";
54 54
55 // Used to write into an existing IOBuffer at a given offset. 55 // Used to write into an existing IOBuffer at a given offset.
56 class DependentIOBuffer : public net::WrappedIOBuffer { 56 class DependentIOBuffer : public net::WrappedIOBuffer {
57 public: 57 public:
58 DependentIOBuffer(net::IOBuffer* buf, int offset) 58 DependentIOBuffer(net::IOBuffer* buf, int offset)
59 : net::WrappedIOBuffer(buf->data() + offset), buf_(buf) {} 59 : net::WrappedIOBuffer(buf->data() + offset), buf_(buf) {}
60 60
61 private: 61 private:
62 ~DependentIOBuffer() override {} 62 ~DependentIOBuffer() override {}
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 void MimeSniffingResourceHandler::OnPluginsLoaded( 606 void MimeSniffingResourceHandler::OnPluginsLoaded(
607 const std::vector<WebPluginInfo>& plugins) { 607 const std::vector<WebPluginInfo>& plugins) {
608 // No longer blocking on the plugins being loaded. 608 // No longer blocking on the plugins being loaded.
609 request()->LogUnblocked(); 609 request()->LogUnblocked();
610 if (state_ == STATE_BUFFERING) 610 if (state_ == STATE_BUFFERING)
611 AdvanceState(); 611 AdvanceState();
612 } 612 }
613 613
614 } // namespace content 614 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/mime_sniffing_resource_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698