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

Side by Side Diff: third_party/WebKit/Source/core/fetch/RawResource.cpp

Issue 1571233003: Fix errors caused by unsafe conversions to/from size_t (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved ALLOW_NUMERIC_ARG_TYPES_PROMOTABLE_TO Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone ); 84 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone );
85 ASSERT(request.resourceRequest().requestContext() == WebURLRequest::RequestC ontextManifest); 85 ASSERT(request.resourceRequest().requestContext() == WebURLRequest::RequestC ontextManifest);
86 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re source::Manifest))); 86 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re source::Manifest)));
87 } 87 }
88 88
89 RawResource::RawResource(const ResourceRequest& resourceRequest, Type type) 89 RawResource::RawResource(const ResourceRequest& resourceRequest, Type type)
90 : Resource(resourceRequest, type) 90 : Resource(resourceRequest, type)
91 { 91 {
92 } 92 }
93 93
94 void RawResource::appendData(const char* data, unsigned length) 94 void RawResource::appendData(const char* data, size_t length)
95 { 95 {
96 Resource::appendData(data, length); 96 Resource::appendData(data, length);
97 97
98 ResourcePtr<RawResource> protect(this); 98 ResourcePtr<RawResource> protect(this);
99 ResourceClientWalker<RawResourceClient> w(m_clients); 99 ResourceClientWalker<RawResourceClient> w(m_clients);
100 while (RawResourceClient* c = w.next()) 100 while (RawResourceClient* c = w.next())
101 c->dataReceived(this, data, length); 101 c->dataReceived(this, data, length);
102 } 102 }
103 103
104 void RawResource::didAddClient(ResourceClient* c) 104 void RawResource::didAddClient(ResourceClient* c)
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 for (const auto& header : oldHeaders) { 268 for (const auto& header : oldHeaders) {
269 AtomicString headerName = header.key; 269 AtomicString headerName = header.key;
270 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH eaders.get(headerName)) 270 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH eaders.get(headerName))
271 return false; 271 return false;
272 } 272 }
273 273
274 return true; 274 return true;
275 } 275 }
276 276
277 } // namespace blink 277 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/RawResource.h ('k') | third_party/WebKit/Source/core/fetch/RawResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698