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 = UseCounter::ChromeLoadTimesUnknown; |
| 2161 if (metric == "requestTime") { |
| 2162 feature = UseCounter::ChromeLoadTimesRequestTime; |
| 2163 } else if (metric == "startLoadTime") { |
| 2164 feature = UseCounter::ChromeLoadTimesStartLoadTime; |
| 2165 } else if (metric == "commitLoadTime") { |
| 2166 feature = UseCounter::ChromeLoadTimesCommitLoadTime; |
| 2167 } else if (metric == "finishDocumentLoadTime") { |
| 2168 feature = UseCounter::ChromeLoadTimesFinishDocumentLoadTime; |
| 2169 } else if (metric == "finishLoadTime") { |
| 2170 feature = UseCounter::ChromeLoadTimesFinishLoadTime; |
| 2171 } else if (metric == "firstPaintTime") { |
| 2172 feature = UseCounter::ChromeLoadTimesFirstPaintTime; |
| 2173 } else if (metric == "firstPaintAfterLoadTime") { |
| 2174 feature = UseCounter::ChromeLoadTimesFirstPaintAfterLoadTime; |
| 2175 } else if (metric == "navigationType") { |
| 2176 feature = UseCounter::ChromeLoadTimesNavigationType; |
| 2177 } else if (metric == "wasFetchedViaSpdy") { |
| 2178 feature = UseCounter::ChromeLoadTimesWasFetchedViaSpdy; |
| 2179 } else if (metric == "wasNpnNegotiated") { |
| 2180 feature = UseCounter::ChromeLoadTimesWasNpnNegotiated; |
| 2181 } else if (metric == "npnNegotiatedProtocol") { |
| 2182 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2183 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2184 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2185 } else if (metric == "connectionInfo") { |
| 2186 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2187 } |
| 2188 UseCounter::count(frame(), feature); |
| 2189 } |
| 2190 |
2158 } // namespace blink | 2191 } // namespace blink |
OLD | NEW |