OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2148 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2148 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
2149 { | 2149 { |
2150 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2150 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2151 } | 2151 } |
2152 | 2152 |
2153 void WebLocalFrameImpl::clearActiveFindMatch() | 2153 void WebLocalFrameImpl::clearActiveFindMatch() |
2154 { | 2154 { |
2155 ensureTextFinder().clearActiveFindMatch(); | 2155 ensureTextFinder().clearActiveFindMatch(); |
2156 } | 2156 } |
2157 | 2157 |
2158 void WebLocalFrameImpl::usageCountChromeLoadtimes(const WebString& metric) | |
2159 { | |
2160 UseCounter::Feature feature; | |
2161 if (metric == "requestTime") { | |
2162 feature = UseCounter::ChromeLoadtimesRequestTime; | |
2163 } | |
2164 if (metric == "startLoadTime") { | |
esprehn
2016/08/05 20:57:36
else if, otherwise you're doing tons of comparison
panicker
2016/08/05 23:06:14
Done.
| |
2165 feature = UseCounter::ChromeLoadtimesStartLoadTime; | |
2166 } | |
2167 if (metric == "commitLoadTime") { | |
2168 feature = UseCounter::ChromeLoadtimesCommitLoadTime; | |
2169 } | |
2170 if (metric == "finishDocumentLoadTime") { | |
2171 feature = UseCounter::ChromeLoadtimesFinishDocumentLoadTime; | |
2172 } | |
2173 if (metric == "finishLoadTime") { | |
2174 feature = UseCounter::ChromeLoadtimesFinishLoadTime; | |
2175 } | |
2176 if (metric == "firstPaintTime") { | |
2177 feature = UseCounter::ChromeLoadtimesFirstPaintTime; | |
2178 } | |
2179 if (metric == "firstPaintAfterLoadTime") { | |
2180 feature = UseCounter::ChromeLoadtimesFirstPaintAfterLoadTime; | |
2181 } | |
2182 if (metric == "navigationType") { | |
2183 feature = UseCounter::ChromeLoadtimesNavigationType; | |
2184 } | |
2185 if (metric == "wasFetchedViaSpdy") { | |
2186 feature = UseCounter::ChromeLoadtimesWasFetchedViaSpdy; | |
2187 } | |
2188 if (metric == "wasNpnNegotiated") { | |
2189 feature = UseCounter::ChromeLoadtimesWasNpnNegotiated; | |
2190 } | |
2191 if (metric == "npnNegotiatedProtocol") { | |
2192 feature = UseCounter::ChromeLoadtimesNpnNegotiatedProtocol; | |
2193 } | |
2194 if (metric == "wasAlternateProtocolAvailable") { | |
2195 feature = UseCounter::ChromeLoadtimesWasAlternateProtocolAvailable; | |
2196 } | |
2197 if (metric == "connectionInfo") { | |
2198 feature = UseCounter::ChromeLoadtimesConnectionInfo; | |
2199 } | |
2200 UseCounter::count(frame(), feature); | |
2201 } | |
2202 | |
2158 } // namespace blink | 2203 } // namespace blink |
OLD | NEW |