Make service workers behave correctly with regards to Page Cache
[WebKit-https.git] / Source / WebCore / page / DiagnosticLoggingKeys.cpp
1 /*
2  * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #include "config.h"
27 #include "DiagnosticLoggingKeys.h"
28
29 namespace WebCore {
30
31 String DiagnosticLoggingKeys::mediaLoadedKey()
32 {
33     return ASCIILiteral("mediaLoaded");
34 }
35
36 String DiagnosticLoggingKeys::mediaLoadingFailedKey()
37 {
38     return ASCIILiteral("mediaFailedLoading");
39 }
40
41 String DiagnosticLoggingKeys::memoryCacheEntryDecisionKey()
42 {
43     return ASCIILiteral("memoryCacheEntryDecision");
44 }
45
46 String DiagnosticLoggingKeys::memoryCacheUsageKey()
47 {
48     return ASCIILiteral("memoryCacheUsage");
49 }
50
51 String DiagnosticLoggingKeys::missingValidatorFieldsKey()
52 {
53     return ASCIILiteral("missingValidatorFields");
54 }
55
56 String DiagnosticLoggingKeys::pluginLoadedKey()
57 {
58     return ASCIILiteral("pluginLoaded");
59 }
60
61 String DiagnosticLoggingKeys::pluginLoadingFailedKey()
62 {
63     return ASCIILiteral("pluginFailedLoading");
64 }
65
66 String DiagnosticLoggingKeys::postPageBackgroundingCPUUsageKey()
67 {
68     return ASCIILiteral("postPageBackgroundingCPUUsage");
69 }
70
71 String DiagnosticLoggingKeys::postPageBackgroundingMemoryUsageKey()
72 {
73     return ASCIILiteral("postPageBackgroundingMemoryUsage");
74 }
75
76 String DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey()
77 {
78     return ASCIILiteral("pageHandlesWebGLContextLoss");
79 }
80
81 String DiagnosticLoggingKeys::postPageLoadCPUUsageKey()
82 {
83     return ASCIILiteral("postPageLoadCPUUsage");
84 }
85
86 String DiagnosticLoggingKeys::postPageLoadMemoryUsageKey()
87 {
88     return ASCIILiteral("postPageLoadMemoryUsage");
89 }
90
91 String DiagnosticLoggingKeys::provisionalLoadKey()
92 {
93     return ASCIILiteral("provisionalLoad");
94 }
95
96 String DiagnosticLoggingKeys::pageContainsPluginKey()
97 {
98     return ASCIILiteral("pageContainsPlugin");
99 }
100
101 String DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey()
102 {
103     return ASCIILiteral("pageContainsAtLeastOnePlugin");
104 }
105
106 String DiagnosticLoggingKeys::pageContainsMediaEngineKey()
107 {
108     return ASCIILiteral("pageContainsMediaEngine");
109 }
110
111 String DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey()
112 {
113     return ASCIILiteral("pageContainsAtLeastOneMediaEngine");
114 }
115
116 String DiagnosticLoggingKeys::pageLoadedKey()
117 {
118     return ASCIILiteral("pageLoaded");
119 }
120
121 String DiagnosticLoggingKeys::playedKey()
122 {
123     return ASCIILiteral("played");
124 }
125
126 String DiagnosticLoggingKeys::engineFailedToLoadKey()
127 {
128     return ASCIILiteral("engineFailedToLoad");
129 }
130
131 String DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey()
132 {
133     return ASCIILiteral("entryRightlyNotWarmedUp");
134 }
135
136 String DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey()
137 {
138     return ASCIILiteral("entryWronglyNotWarmedUp");
139 }
140
141 String DiagnosticLoggingKeys::navigationKey()
142 {
143     return ASCIILiteral("navigation");
144 }
145
146 String DiagnosticLoggingKeys::needsRevalidationKey()
147 {
148     return ASCIILiteral("needsRevalidation");
149 }
150
151 String DiagnosticLoggingKeys::networkCacheKey()
152 {
153     return ASCIILiteral("networkCache");
154 }
155
156 String DiagnosticLoggingKeys::networkCacheFailureReasonKey()
157 {
158     return ASCIILiteral("networkCacheFailureReason");
159 }
160
161 String DiagnosticLoggingKeys::networkCacheUnusedReasonKey()
162 {
163     return ASCIILiteral("networkCacheUnusedReason");
164 }
165
166 String DiagnosticLoggingKeys::networkCacheReuseFailureKey()
167 {
168     return ASCIILiteral("networkCacheReuseFailure");
169 }
170
171 String DiagnosticLoggingKeys::networkKey()
172 {
173     return ASCIILiteral("network");
174 }
175
176 String DiagnosticLoggingKeys::networkProcessCrashedKey()
177 {
178     return ASCIILiteral("networkProcessCrashed");
179 }
180
181 String DiagnosticLoggingKeys::neverSeenBeforeKey()
182 {
183     return ASCIILiteral("neverSeenBefore");
184 }
185
186 String DiagnosticLoggingKeys::noKey()
187 {
188     return ASCIILiteral("no");
189 }
190
191 String DiagnosticLoggingKeys::noCacheKey()
192 {
193     return ASCIILiteral("noCache");
194 }
195
196 String DiagnosticLoggingKeys::noStoreKey()
197 {
198     return ASCIILiteral("noStore");
199 }
200
201 String DiagnosticLoggingKeys::nonVisibleStateKey()
202 {
203     return ASCIILiteral("nonVisibleState");
204 }
205
206 String DiagnosticLoggingKeys::notInMemoryCacheKey()
207 {
208     return ASCIILiteral("notInMemoryCache");
209 }
210
211 String DiagnosticLoggingKeys::pageCacheKey()
212 {
213     return ASCIILiteral("pageCache");
214 }
215
216 String DiagnosticLoggingKeys::pageCacheFailureKey()
217 {
218     return ASCIILiteral("pageCacheFailure");
219 }
220
221 String DiagnosticLoggingKeys::noDocumentLoaderKey()
222 {
223     return ASCIILiteral("noDocumentLoader");
224 }
225
226 String DiagnosticLoggingKeys::noLongerInCacheKey()
227 {
228     return ASCIILiteral("noLongerInCache");
229 }
230
231 String DiagnosticLoggingKeys::otherKey()
232 {
233     return ASCIILiteral("other");
234 }
235
236 String DiagnosticLoggingKeys::mainDocumentErrorKey()
237 {
238     return ASCIILiteral("mainDocumentError");
239 }
240
241 String DiagnosticLoggingKeys::mainResourceKey()
242 {
243     return ASCIILiteral("mainResource");
244 }
245
246 String DiagnosticLoggingKeys::isErrorPageKey()
247 {
248     return ASCIILiteral("isErrorPage");
249 }
250
251 String DiagnosticLoggingKeys::isExpiredKey()
252 {
253     return ASCIILiteral("isExpired");
254 }
255
256 String DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey()
257 {
258     return ASCIILiteral("isReloadIgnoringCacheData");
259 }
260
261 String DiagnosticLoggingKeys::loadingKey()
262 {
263     return ASCIILiteral("loading");
264 }
265
266 String DiagnosticLoggingKeys::hasPluginsKey()
267 {
268     return ASCIILiteral("hasPlugins");
269 }
270
271 String DiagnosticLoggingKeys::httpsNoStoreKey()
272 {
273     return ASCIILiteral("httpsNoStore");
274 }
275
276 String DiagnosticLoggingKeys::imageKey()
277 {
278     return ASCIILiteral("image");
279 }
280
281 String DiagnosticLoggingKeys::inMemoryCacheKey()
282 {
283     return ASCIILiteral("inMemoryCache");
284 }
285
286 String DiagnosticLoggingKeys::inactiveKey()
287 {
288     return ASCIILiteral("inactive");
289 }
290
291 String DiagnosticLoggingKeys::internalErrorKey()
292 {
293     return ASCIILiteral("internalError");
294 }
295
296 String DiagnosticLoggingKeys::invalidSessionIDKey()
297 {
298     return ASCIILiteral("invalidSessionID");
299 }
300
301 String DiagnosticLoggingKeys::isAttachmentKey()
302 {
303     return ASCIILiteral("isAttachment");
304 }
305
306 String DiagnosticLoggingKeys::isConditionalRequestKey()
307 {
308     return ASCIILiteral("isConditionalRequest");
309 }
310
311 String DiagnosticLoggingKeys::isDisabledKey()
312 {
313     return ASCIILiteral("isDisabled");
314 }
315
316 String DiagnosticLoggingKeys::noCurrentHistoryItemKey()
317 {
318     return ASCIILiteral("noCurrentHistoryItem");
319 }
320
321 String DiagnosticLoggingKeys::quirkRedirectComingKey()
322 {
323     return ASCIILiteral("quirkRedirectComing");
324 }
325
326 String DiagnosticLoggingKeys::rawKey()
327 {
328     return ASCIILiteral("raw");
329 }
330
331 String DiagnosticLoggingKeys::redirectKey()
332 {
333     return ASCIILiteral("redirect");
334 }
335
336 String DiagnosticLoggingKeys::isLoadingKey()
337 {
338     return ASCIILiteral("isLoading");
339 }
340
341 String DiagnosticLoggingKeys::documentLoaderStoppingKey()
342 {
343     return ASCIILiteral("documentLoaderStopping");
344 }
345
346 String DiagnosticLoggingKeys::domainCausingCrashKey()
347 {
348     return ASCIILiteral("DomainCausingCrash");
349 }
350
351 String DiagnosticLoggingKeys::domainCausingEnergyDrainKey()
352 {
353     return ASCIILiteral("DomainCausingEnergyDrain");
354 }
355
356 String DiagnosticLoggingKeys::domainCausingJetsamKey()
357 {
358     return ASCIILiteral("DomainCausingJetsam");
359 }
360
361 String DiagnosticLoggingKeys::simulatedPageCrashKey()
362 {
363     return ASCIILiteral("SimulatedPageCrash");
364 }
365
366 String DiagnosticLoggingKeys::exceededActiveMemoryLimitKey()
367 {
368     return ASCIILiteral("ExceededActiveMemoryLimit");
369 }
370
371 String DiagnosticLoggingKeys::exceededInactiveMemoryLimitKey()
372 {
373     return ASCIILiteral("ExceededInactiveMemoryLimit");
374 }
375
376 String DiagnosticLoggingKeys::exceededBackgroundCPULimitKey()
377 {
378     return ASCIILiteral("ExceededBackgroundCPULimit");
379 }
380
381 String DiagnosticLoggingKeys::domainVisitedKey()
382 {
383     return ASCIILiteral("DomainVisited");
384 }
385
386 String DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey()
387 {
388     return ASCIILiteral("cannotSuspendActiveDOMObjects");
389 }
390
391 String DiagnosticLoggingKeys::cpuUsageKey()
392 {
393     return ASCIILiteral("cpuUsage");
394 }
395
396 String DiagnosticLoggingKeys::createSharedBufferFailedKey()
397 {
398     return ASCIILiteral("createSharedBufferFailed");
399 }
400
401 String DiagnosticLoggingKeys::activeInForegroundTabKey()
402 {
403     return ASCIILiteral("activeInForegroundTab");
404 }
405
406 String DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey()
407 {
408     return ASCIILiteral("activeInBackgroundTabOnly");
409 }
410
411 String DiagnosticLoggingKeys::applicationCacheKey()
412 {
413     return ASCIILiteral("applicationCache");
414 }
415
416 #if ENABLE(APPLICATION_MANIFEST)
417 String DiagnosticLoggingKeys::applicationManifestKey()
418 {
419     return ASCIILiteral("applicationManifest");
420 }
421 #endif
422
423 String DiagnosticLoggingKeys::audioKey()
424 {
425     return ASCIILiteral("audio");
426 }
427
428 String DiagnosticLoggingKeys::backNavigationDeltaKey()
429 {
430     return ASCIILiteral("backNavigationDelta");
431 }
432
433 String DiagnosticLoggingKeys::canCacheKey()
434 {
435     return ASCIILiteral("canCache");
436 }
437
438 String DiagnosticLoggingKeys::cacheControlNoStoreKey()
439 {
440     return ASCIILiteral("cacheControlNoStore");
441 }
442
443 String DiagnosticLoggingKeys::cachedResourceRevalidationKey()
444 {
445     return ASCIILiteral("cachedResourceRevalidation");
446 }
447
448 String DiagnosticLoggingKeys::cachedResourceRevalidationReasonKey()
449 {
450     return ASCIILiteral("cachedResourceRevalidationReason");
451 }
452
453 String DiagnosticLoggingKeys::deniedByClientKey()
454 {
455     return ASCIILiteral("deniedByClient");
456 }
457
458 String DiagnosticLoggingKeys::deviceMotionKey()
459 {
460     return ASCIILiteral("deviceMotion");
461 }
462
463 String DiagnosticLoggingKeys::deviceOrientationKey()
464 {
465     return ASCIILiteral("deviceOrientation");
466 }
467
468 String DiagnosticLoggingKeys::diskCacheKey()
469 {
470     return ASCIILiteral("diskCache");
471 }
472
473 String DiagnosticLoggingKeys::diskCacheAfterValidationKey()
474 {
475     return ASCIILiteral("diskCacheAfterValidation");
476 }
477
478 String DiagnosticLoggingKeys::reloadKey()
479 {
480     return ASCIILiteral("reload");
481 }
482
483 String DiagnosticLoggingKeys::replaceKey()
484 {
485     return ASCIILiteral("replace");
486 }
487
488 String DiagnosticLoggingKeys::retrievalRequestKey()
489 {
490     return ASCIILiteral("retrievalRequest");
491 }
492
493 String DiagnosticLoggingKeys::resourceLoadedKey()
494 {
495     return ASCIILiteral("resourceLoaded");
496 }
497
498 String DiagnosticLoggingKeys::resourceResponseSourceKey()
499 {
500     return ASCIILiteral("resourceResponseSource");
501 }
502
503 String DiagnosticLoggingKeys::retrievalKey()
504 {
505     return ASCIILiteral("retrieval");
506 }
507
508 String DiagnosticLoggingKeys::revalidatingKey()
509 {
510     return ASCIILiteral("revalidating");
511 }
512
513 String DiagnosticLoggingKeys::reloadFromOriginKey()
514 {
515     return ASCIILiteral("reloadFromOrigin");
516 }
517
518 String DiagnosticLoggingKeys::reloadRevalidatingExpiredKey()
519 {
520     return ASCIILiteral("reloadRevalidatingExpired");
521 }
522
523 String DiagnosticLoggingKeys::sameLoadKey()
524 {
525     return ASCIILiteral("sameLoad");
526 }
527
528 String DiagnosticLoggingKeys::scriptKey()
529 {
530     return ASCIILiteral("script");
531 }
532
533 String DiagnosticLoggingKeys::serviceWorkerKey()
534 {
535     return ASCIILiteral("serviceWorker");
536 }
537
538 String DiagnosticLoggingKeys::streamingMedia()
539 {
540     return ASCIILiteral("streamingMedia");
541 }
542
543 String DiagnosticLoggingKeys::styleSheetKey()
544 {
545     return ASCIILiteral("styleSheet");
546 }
547
548 String DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey()
549 {
550     return ASCIILiteral("successfulSpeculativeWarmupWithRevalidation");
551 }
552
553 String DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey()
554 {
555     return ASCIILiteral("successfulSpeculativeWarmupWithoutRevalidation");
556 }
557
558 String DiagnosticLoggingKeys::svgDocumentKey()
559 {
560     return ASCIILiteral("svgDocument");
561 }
562
563 String DiagnosticLoggingKeys::synchronousMessageFailedKey()
564 {
565     return ASCIILiteral("synchronousMessageFailed");
566 }
567
568 String DiagnosticLoggingKeys::uncacheableStatusCodeKey()
569 {
570     return ASCIILiteral("uncacheableStatusCode");
571 }
572
573 String DiagnosticLoggingKeys::underMemoryPressureKey()
574 {
575     return ASCIILiteral("underMemoryPressure");
576 }
577
578 String DiagnosticLoggingKeys::unknownEntryRequestKey()
579 {
580     return ASCIILiteral("unknownEntryRequest");
581 }
582
583 String DiagnosticLoggingKeys::unlikelyToReuseKey()
584 {
585     return ASCIILiteral("unlikelyToReuse");
586 }
587
588 String DiagnosticLoggingKeys::unsupportedHTTPMethodKey()
589 {
590     return ASCIILiteral("unsupportedHTTPMethod");
591 }
592
593 String DiagnosticLoggingKeys::unsuspendableDOMObjectKey()
594 {
595     return ASCIILiteral("unsuspendableDOMObject");
596 }
597
598 String DiagnosticLoggingKeys::unusedKey()
599 {
600     return ASCIILiteral("unused");
601 }
602
603 String DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey()
604 {
605     return ASCIILiteral("unused.reason.credentialSettings");
606 }
607
608 String DiagnosticLoggingKeys::unusedReasonErrorKey()
609 {
610     return ASCIILiteral("unused.reason.error");
611 }
612
613 String DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey()
614 {
615     return ASCIILiteral("unused.reason.mustRevalidateNoValidator");
616 }
617
618 String DiagnosticLoggingKeys::unusedReasonNoStoreKey()
619 {
620     return ASCIILiteral("unused.reason.noStore");
621 }
622
623 String DiagnosticLoggingKeys::unusedReasonRedirectChainKey()
624 {
625     return ASCIILiteral("unused.reason.redirectChain");
626 }
627
628 String DiagnosticLoggingKeys::unusedReasonReloadKey()
629 {
630     return ASCIILiteral("unused.reason.reload");
631 }
632
633 String DiagnosticLoggingKeys::unusedReasonTypeMismatchKey()
634 {
635     return ASCIILiteral("unused.reason.typeMismatch");
636 }
637
638 String DiagnosticLoggingKeys::usedKey()
639 {
640     return ASCIILiteral("used");
641 }
642
643 String DiagnosticLoggingKeys::userZoomActionKey()
644 {
645     return ASCIILiteral("userZoomAction");
646 }
647
648 String DiagnosticLoggingKeys::varyingHeaderMismatchKey()
649 {
650     return ASCIILiteral("varyingHeaderMismatch");
651 }
652
653 String DiagnosticLoggingKeys::videoKey()
654 {
655     return ASCIILiteral("video");
656 }
657
658 String DiagnosticLoggingKeys::visibleNonActiveStateKey()
659 {
660     return ASCIILiteral("visibleNonActiveState");
661 }
662
663 String DiagnosticLoggingKeys::visibleAndActiveStateKey()
664 {
665     return ASCIILiteral("visibleAndActiveState");
666 }
667
668 String DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey()
669 {
670     return ASCIILiteral("wastedSpeculativeWarmupWithRevalidation");
671 }
672
673 String DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey()
674 {
675     return ASCIILiteral("wastedSpeculativeWarmupWithoutRevalidation");
676 }
677
678 String DiagnosticLoggingKeys::webViewKey()
679 {
680     return ASCIILiteral("webView");
681 }
682
683 String DiagnosticLoggingKeys::yesKey()
684 {
685     return ASCIILiteral("yes");
686 }
687
688 String DiagnosticLoggingKeys::expiredKey()
689 {
690     return ASCIILiteral("expired");
691 }
692
693 String DiagnosticLoggingKeys::fontKey()
694 {
695     return ASCIILiteral("font");
696 }
697
698 String DiagnosticLoggingKeys::prunedDueToMemoryPressureKey()
699 {
700     return ASCIILiteral("pruned.memoryPressure");
701 }
702
703 String DiagnosticLoggingKeys::prunedDueToMaxSizeReached()
704 {
705     return ASCIILiteral("pruned.capacityReached");
706 }
707
708 String DiagnosticLoggingKeys::prunedDueToProcessSuspended()
709 {
710     return ASCIILiteral("pruned.processSuspended");
711 }
712
713 String WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey()
714 {
715     return ASCIILiteral("notHTTPFamily");
716 }
717
718 String WebCore::DiagnosticLoggingKeys::webGLStateKey()
719 {
720     return ASCIILiteral("webGLState");
721 }
722
723 String DiagnosticLoggingKeys::memoryUsageToDiagnosticLoggingKey(uint64_t memoryUsage)
724 {
725     if (memoryUsage < 32 * MB)
726         return ASCIILiteral("below32");
727     if (memoryUsage < 64 * MB)
728         return ASCIILiteral("32to64");
729     if (memoryUsage < 128 * MB)
730         return ASCIILiteral("64to128");
731     if (memoryUsage < 256 * MB)
732         return ASCIILiteral("128to256");
733     if (memoryUsage < 512 * MB)
734         return ASCIILiteral("256to512");
735     if (memoryUsage < 1024 * MB)
736         return ASCIILiteral("512to1024");
737     if (memoryUsage < 2048 * MB)
738         return ASCIILiteral("1024to2048");
739     if (memoryUsage < 4096llu * MB)
740         return ASCIILiteral("2048to4096");
741     if (memoryUsage < 8192llu * MB)
742         return ASCIILiteral("4096to8192");
743     if (memoryUsage < 16384llu * MB)
744         return ASCIILiteral("8192to16384");
745     if (memoryUsage < 32768llu * MB)
746         return ASCIILiteral("16384to32768");
747     return ASCIILiteral("over32768");
748 }
749
750 String DiagnosticLoggingKeys::foregroundCPUUsageToDiagnosticLoggingKey(double cpuUsage)
751 {
752     if (cpuUsage < 10)
753         return ASCIILiteral("below10");
754     if (cpuUsage < 20)
755         return ASCIILiteral("10to20");
756     if (cpuUsage < 40)
757         return ASCIILiteral("20to40");
758     if (cpuUsage < 60)
759         return ASCIILiteral("40to60");
760     if (cpuUsage < 80)
761         return ASCIILiteral("60to80");
762     return ASCIILiteral("over80");
763 }
764
765 String DiagnosticLoggingKeys::backgroundCPUUsageToDiagnosticLoggingKey(double cpuUsage)
766 {
767     if (cpuUsage < 1)
768         return ASCIILiteral("below1");
769     if (cpuUsage < 5)
770         return ASCIILiteral("1to5");
771     if (cpuUsage < 10)
772         return ASCIILiteral("5to10");
773     if (cpuUsage < 30)
774         return ASCIILiteral("10to30");
775     if (cpuUsage < 50)
776         return ASCIILiteral("30to50");
777     if (cpuUsage < 70)
778         return ASCIILiteral("50to70");
779     return ASCIILiteral("over70");
780 }
781
782 String DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey()
783 {
784     return ASCIILiteral("resourceLoadStatisticsTelemetry");
785 }
786     
787 } // namespace WebCore
788