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

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

Issue 2443873002: Remove bitfields in Resource used for storing enum values (Closed)
Patch Set: Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
7 rights reserved. 7 rights reserved.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 m_needsSynchronousCacheHit(false), 316 m_needsSynchronousCacheHit(false),
317 m_linkPreload(false), 317 m_linkPreload(false),
318 m_isRevalidating(false), 318 m_isRevalidating(false),
319 m_isAlive(false), 319 m_isAlive(false),
320 m_isAddRemoveClientProhibited(false), 320 m_isAddRemoveClientProhibited(false),
321 m_integrityDisposition(ResourceIntegrityDisposition::NotChecked), 321 m_integrityDisposition(ResourceIntegrityDisposition::NotChecked),
322 m_options(options), 322 m_options(options),
323 m_responseTimestamp(currentTime()), 323 m_responseTimestamp(currentTime()),
324 m_cancelTimer(this, &Resource::cancelTimerFired), 324 m_cancelTimer(this, &Resource::cancelTimerFired),
325 m_resourceRequest(request) { 325 m_resourceRequest(request) {
326 // m_type is a bitfield, so this tests careless updates of the enum.
327 DCHECK_EQ(m_type, unsigned(type));
328 InstanceCounters::incrementCounter(InstanceCounters::ResourceCounter); 326 InstanceCounters::incrementCounter(InstanceCounters::ResourceCounter);
329 327
330 // Currently we support the metadata caching only for HTTP family. 328 // Currently we support the metadata caching only for HTTP family.
331 if (m_resourceRequest.url().protocolIsInHTTPFamily()) 329 if (m_resourceRequest.url().protocolIsInHTTPFamily())
332 m_cacheHandler = CachedMetadataHandlerImpl::create(this); 330 m_cacheHandler = CachedMetadataHandlerImpl::create(this);
333 MemoryCoordinator::instance().registerClient(this); 331 MemoryCoordinator::instance().registerClient(this);
334 } 332 }
335 333
336 Resource::~Resource() { 334 Resource::~Resource() {
337 InstanceCounters::decrementCounter(InstanceCounters::ResourceCounter); 335 InstanceCounters::decrementCounter(InstanceCounters::ResourceCounter);
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 case Resource::TextTrack: 1102 case Resource::TextTrack:
1105 case Resource::Media: 1103 case Resource::Media:
1106 case Resource::Manifest: 1104 case Resource::Manifest:
1107 return false; 1105 return false;
1108 } 1106 }
1109 NOTREACHED(); 1107 NOTREACHED();
1110 return false; 1108 return false;
1111 } 1109 }
1112 1110
1113 } // namespace blink 1111 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698