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

Side by Side Diff: webkit/common/resource_type.h

Issue 55513002: Add ResourceType::PING. and mark those requests as detachable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: histograms.xml Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_COMMON_RESOURCE_TYPE_H__ 5 #ifndef WEBKIT_COMMON_RESOURCE_TYPE_H__
6 #define WEBKIT_COMMON_RESOURCE_TYPE_H__ 6 #define WEBKIT_COMMON_RESOURCE_TYPE_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "third_party/WebKit/public/platform/WebURLRequest.h" 9 #include "third_party/WebKit/public/platform/WebURLRequest.h"
10 #include "webkit/common/webkit_common_export.h" 10 #include "webkit/common/webkit_common_export.h"
(...skipping 11 matching lines...) Expand all
22 FONT_RESOURCE, // a font 22 FONT_RESOURCE, // a font
23 SUB_RESOURCE, // an "other" subresource. 23 SUB_RESOURCE, // an "other" subresource.
24 OBJECT, // an object (or embed) tag for a plugin, 24 OBJECT, // an object (or embed) tag for a plugin,
25 // or a resource that a plugin requested. 25 // or a resource that a plugin requested.
26 MEDIA, // a media resource. 26 MEDIA, // a media resource.
27 WORKER, // the main resource of a dedicated worker. 27 WORKER, // the main resource of a dedicated worker.
28 SHARED_WORKER, // the main resource of a shared worker. 28 SHARED_WORKER, // the main resource of a shared worker.
29 PREFETCH, // an explicitly requested prefetch 29 PREFETCH, // an explicitly requested prefetch
30 FAVICON, // a favicon 30 FAVICON, // a favicon
31 XHR, // a XMLHttpRequest 31 XHR, // a XMLHttpRequest
32 PING, // a ping request for <a ping>
32 LAST_TYPE // Place holder so we don't need to change ValidType 33 LAST_TYPE // Place holder so we don't need to change ValidType
33 // everytime. 34 // everytime.
34 }; 35 };
35 36
36 static bool ValidType(int32 type) { 37 static bool ValidType(int32 type) {
37 return type >= MAIN_FRAME && type < LAST_TYPE; 38 return type >= MAIN_FRAME && type < LAST_TYPE;
38 } 39 }
39 40
40 static Type FromInt(int32 type) { 41 static Type FromInt(int32 type) {
41 return static_cast<Type>(type); 42 return static_cast<Type>(type);
(...skipping 19 matching lines...) Expand all
61 type == WORKER || 62 type == WORKER ||
62 type == XHR; 63 type == XHR;
63 } 64 }
64 65
65 private: 66 private:
66 // Don't instantiate this class. 67 // Don't instantiate this class.
67 ResourceType(); 68 ResourceType();
68 ~ResourceType(); 69 ~ResourceType();
69 }; 70 };
70 #endif // WEBKIT_COMMON_RESOURCE_TYPE_H__ 71 #endif // WEBKIT_COMMON_RESOURCE_TYPE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698