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

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

Issue 1369253002: Add Web Resources usage to chrome://tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Patch Set: Fix names. Created 5 years, 2 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l ong /* totalBytesToBeSent */) { } 255 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long l ong /* totalBytesToBeSent */) { }
256 virtual void didDownloadData(int) { } 256 virtual void didDownloadData(int) { }
257 257
258 double loadFinishTime() const { return m_loadFinishTime; } 258 double loadFinishTime() const { return m_loadFinishTime; }
259 259
260 virtual bool canReuse(const ResourceRequest&) const { return true; } 260 virtual bool canReuse(const ResourceRequest&) const { return true; }
261 261
262 // Used by the MemoryCache to reduce the memory consumption of the entry. 262 // Used by the MemoryCache to reduce the memory consumption of the entry.
263 void prune(); 263 void prune();
264 264
265 virtual void onMemoryDump(WebProcessMemoryDump*) const;
266
265 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); 267 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&);
266 268
267 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK 269 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK
268 void assertAlive() const { RELEASE_ASSERT(!m_deleted); } 270 void assertAlive() const { RELEASE_ASSERT(!m_deleted); }
269 #else 271 #else
270 void assertAlive() const { } 272 void assertAlive() const { }
271 #endif 273 #endif
272 274
273 protected: 275 protected:
274 virtual void checkNotify(); 276 virtual void checkNotify();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 340 }
339 341
340 ResourceRequest m_request; 342 ResourceRequest m_request;
341 ResourceResponse m_redirectResponse; 343 ResourceResponse m_redirectResponse;
342 }; 344 };
343 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain; } 345 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain; }
344 346
345 virtual bool isSafeToUnlock() const { return false; } 347 virtual bool isSafeToUnlock() const { return false; }
346 virtual void destroyDecodedDataIfPossible() { } 348 virtual void destroyDecodedDataIfPossible() { }
347 349
350 // Returns the memory dump name used for tracing. See Resource::onMemoryDump .
351 String getMemoryDumpName() const;
352
348 ResourceRequest m_resourceRequest; 353 ResourceRequest m_resourceRequest;
349 AtomicString m_accept; 354 AtomicString m_accept;
350 PersistentWillBeMember<ResourceLoader> m_loader; 355 PersistentWillBeMember<ResourceLoader> m_loader;
351 ResourceLoaderOptions m_options; 356 ResourceLoaderOptions m_options;
352 357
353 ResourceResponse m_response; 358 ResourceResponse m_response;
354 double m_responseTimestamp; 359 double m_responseTimestamp;
355 360
356 RefPtr<SharedBuffer> m_data; 361 RefPtr<SharedBuffer> m_data;
357 Timer<Resource> m_cancelTimer; 362 Timer<Resource> m_cancelTimer;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 const char* ResourceTypeName(Resource::Type); 448 const char* ResourceTypeName(Resource::Type);
444 #endif 449 #endif
445 450
446 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 451 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
447 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ 452 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \
448 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } 453 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); }
449 454
450 } 455 }
451 456
452 #endif 457 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698