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

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.h

Issue 2324033004: Fix "More than one command on the same line" presubmit errors: core/fetch,loader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: decreasePreloadCount() Created 4 years, 3 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 bool wasCanceled() const { return m_error.isCancellation(); } 210 bool wasCanceled() const { return m_error.isCancellation(); }
211 bool errorOccurred() const { return m_status == LoadError || m_status == Dec odeError; } 211 bool errorOccurred() const { return m_status == LoadError || m_status == Dec odeError; }
212 bool loadFailedOrCanceled() { return !m_error.isNull(); } 212 bool loadFailedOrCanceled() { return !m_error.isNull(); }
213 213
214 DataBufferingPolicy getDataBufferingPolicy() const { return m_options.dataBu fferingPolicy; } 214 DataBufferingPolicy getDataBufferingPolicy() const { return m_options.dataBu fferingPolicy; }
215 void setDataBufferingPolicy(DataBufferingPolicy); 215 void setDataBufferingPolicy(DataBufferingPolicy);
216 216
217 bool isUnusedPreload() const { return isPreloaded() && getPreloadResult() == PreloadNotReferenced; } 217 bool isUnusedPreload() const { return isPreloaded() && getPreloadResult() == PreloadNotReferenced; }
218 bool isPreloaded() const { return m_preloadCount; } 218 bool isPreloaded() const { return m_preloadCount; }
219 void increasePreloadCount() { ++m_preloadCount; } 219 void increasePreloadCount() { ++m_preloadCount; }
220 void decreasePreloadCount() { ASSERT(m_preloadCount); --m_preloadCount; } 220 void decreasePreloadCount()
221 {
222 DCHECK(m_preloadCount);
223 --m_preloadCount;
224 }
221 225
222 bool canReuseRedirectChain(); 226 bool canReuseRedirectChain();
223 bool mustRevalidateDueToCacheHeaders(); 227 bool mustRevalidateDueToCacheHeaders();
224 bool canUseCacheValidator(); 228 bool canUseCacheValidator();
225 bool isCacheValidator() const { return m_isRevalidating; } 229 bool isCacheValidator() const { return m_isRevalidating; }
226 bool hasCacheControlNoStoreHeader() const; 230 bool hasCacheControlNoStoreHeader() const;
227 bool hasVaryHeader() const; 231 bool hasVaryHeader() const;
228 virtual bool mustRefetchDueToIntegrityMetadata(const FetchRequest& request) const { return false; } 232 virtual bool mustRefetchDueToIntegrityMetadata(const FetchRequest& request) const { return false; }
229 233
230 double currentAge() const; 234 double currentAge() const;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 396
393 Resource::Type m_type; 397 Resource::Type m_type;
394 }; 398 };
395 399
396 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 400 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
397 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName); 401 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName);
398 402
399 } // namespace blink 403 } // namespace blink
400 404
401 #endif 405 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698