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

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

Issue 2140513002: Add UMAs for SharedBuffer::lock()/unlock() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reflect comments for histograms.xml Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | 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) 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class ResourceLoader; 50 class ResourceLoader;
51 class SecurityOrigin; 51 class SecurityOrigin;
52 class SharedBuffer; 52 class SharedBuffer;
53 53
54 // A resource that is held in the cache. Classes who want to use this object sho uld derive 54 // A resource that is held in the cache. Classes who want to use this object sho uld derive
55 // from ResourceClient, to get the function calls in case the requested data has arrived. 55 // from ResourceClient, to get the function calls in case the requested data has arrived.
56 // This class also does the actual communication with the loader to obtain the r esource from the network. 56 // This class also does the actual communication with the loader to obtain the r esource from the network.
57 class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource> { 57 class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource> {
58 WTF_MAKE_NONCOPYABLE(Resource); 58 WTF_MAKE_NONCOPYABLE(Resource);
59 public: 59 public:
60 // |Type| enum values are used in UMAs, so do not change the values of
61 // existing |Type|. When adding a new |Type|, append it at the end and
62 // update |kLastResourceType|.
60 enum Type { 63 enum Type {
61 MainResource, 64 MainResource,
62 Image, 65 Image,
63 CSSStyleSheet, 66 CSSStyleSheet,
64 Script, 67 Script,
65 Font, 68 Font,
66 Raw, 69 Raw,
67 SVGDocument, 70 SVGDocument,
68 XSLStyleSheet, 71 XSLStyleSheet,
69 LinkPrefetch, 72 LinkPrefetch,
70 LinkPreload, 73 LinkPreload,
71 TextTrack, 74 TextTrack,
72 ImportResource, 75 ImportResource,
73 Media, // Audio or video file requested by a HTML5 media element 76 Media, // Audio or video file requested by a HTML5 media element
74 Manifest 77 Manifest
75 }; 78 };
79 static const int kLastResourceType = Manifest + 1;
76 80
77 enum Status { 81 enum Status {
78 NotStarted, 82 NotStarted,
79 Pending, // load in progress 83 Pending, // load in progress
80 Cached, // load completed successfully 84 Cached, // load completed successfully
81 LoadError, 85 LoadError,
82 DecodeError 86 DecodeError
83 }; 87 };
84 88
85 // Exposed for testing. 89 // Exposed for testing.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 371
368 Resource::Type m_type; 372 Resource::Type m_type;
369 }; 373 };
370 374
371 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 375 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
372 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName); 376 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName);
373 377
374 } // namespace blink 378 } // namespace blink
375 379
376 #endif 380 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698