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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceEntry.cpp

Issue 2472583003: Navigation Timing Level 2 (Closed)
Patch Set: added TAO(timing-allow-origin) check and RA(redirect allow) check Created 4 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (entryType == "longtask") 70 if (entryType == "longtask")
71 return LongTask; 71 return LongTask;
72 if (entryType == "mark") 72 if (entryType == "mark")
73 return Mark; 73 return Mark;
74 if (entryType == "measure") 74 if (entryType == "measure")
75 return Measure; 75 return Measure;
76 if (entryType == "render") 76 if (entryType == "render")
77 return Render; 77 return Render;
78 if (entryType == "resource") 78 if (entryType == "resource")
79 return Resource; 79 return Resource;
80 if (entryType == "navigation")
81 return Navigation;
80 return Invalid; 82 return Invalid;
81 } 83 }
82 84
83 ScriptValue PerformanceEntry::toJSONForBinding(ScriptState* scriptState) const { 85 ScriptValue PerformanceEntry::toJSONForBinding(ScriptState* scriptState) const {
84 V8ObjectBuilder result(scriptState); 86 V8ObjectBuilder result(scriptState);
85 buildJSONValue(result); 87 buildJSONValue(result);
86 return result.scriptValue(); 88 return result.scriptValue();
87 } 89 }
88 90
89 void PerformanceEntry::buildJSONValue(V8ObjectBuilder& builder) const { 91 void PerformanceEntry::buildJSONValue(V8ObjectBuilder& builder) const {
90 builder.addString("name", name()); 92 builder.addString("name", name());
91 builder.addString("entryType", entryType()); 93 builder.addString("entryType", entryType());
92 builder.addNumber("startTime", startTime()); 94 builder.addNumber("startTime", startTime());
93 builder.addNumber("duration", duration()); 95 builder.addNumber("duration", duration());
94 } 96 }
95 97
96 } // namespace blink 98 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698