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

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

Issue 2920663002: Class/struct layout optimization for blink Resource related classes (Closed)
Patch Set: Rebase Created 3 years, 6 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) 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 Platform::Current()->CacheMetadataInCacheStorage( 253 Platform::Current()->CacheMetadataInCacheStorage(
254 GetResponse().Url(), GetResponse().ResponseTime(), nullptr, 0, 254 GetResponse().Url(), GetResponse().ResponseTime(), nullptr, 0,
255 WebSecurityOrigin(security_origin_), 255 WebSecurityOrigin(security_origin_),
256 GetResponse().CacheStorageCacheName()); 256 GetResponse().CacheStorageCacheName());
257 } 257 }
258 } 258 }
259 259
260 Resource::Resource(const ResourceRequest& request, 260 Resource::Resource(const ResourceRequest& request,
261 Type type, 261 Type type,
262 const ResourceLoaderOptions& options) 262 const ResourceLoaderOptions& options)
263 : load_finish_time_(0), 263 : preload_result_(kPreloadNotReferenced),
264 type_(type),
265 status_(ResourceStatus::kNotStarted),
266 load_finish_time_(0),
264 identifier_(0), 267 identifier_(0),
268 preload_count_(0),
269 preload_discovery_time_(0.0),
265 encoded_size_(0), 270 encoded_size_(0),
266 encoded_size_memory_usage_(0), 271 encoded_size_memory_usage_(0),
267 decoded_size_(0), 272 decoded_size_(0),
268 overhead_size_(CalculateOverheadSize()), 273 overhead_size_(CalculateOverheadSize()),
269 preload_count_(0),
270 preload_discovery_time_(0.0),
271 cache_identifier_(MemoryCache::DefaultCacheIdentifier()), 274 cache_identifier_(MemoryCache::DefaultCacheIdentifier()),
272 preload_result_(kPreloadNotReferenced),
273 type_(type),
274 status_(ResourceStatus::kNotStarted),
275 needs_synchronous_cache_hit_(false), 275 needs_synchronous_cache_hit_(false),
276 link_preload_(false), 276 link_preload_(false),
277 is_revalidating_(false), 277 is_revalidating_(false),
278 is_alive_(false), 278 is_alive_(false),
279 is_add_remove_client_prohibited_(false), 279 is_add_remove_client_prohibited_(false),
280 integrity_disposition_(ResourceIntegrityDisposition::kNotChecked), 280 integrity_disposition_(ResourceIntegrityDisposition::kNotChecked),
281 options_(options), 281 options_(options),
282 response_timestamp_(CurrentTime()), 282 response_timestamp_(CurrentTime()),
283 cancel_timer_( 283 cancel_timer_(
284 // We use MainThread() for main-thread cases to avoid syscall cost 284 // We use MainThread() for main-thread cases to avoid syscall cost
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 case Resource::kMedia: 1128 case Resource::kMedia:
1129 case Resource::kManifest: 1129 case Resource::kManifest:
1130 case Resource::kMock: 1130 case Resource::kMock:
1131 return false; 1131 return false;
1132 } 1132 }
1133 NOTREACHED(); 1133 NOTREACHED();
1134 return false; 1134 return false;
1135 } 1135 }
1136 1136
1137 } // namespace blink 1137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698