OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2013 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 1000 * (monotonicallyIncreasingTime() - preload->discoveryTime())); | 81 1000 * (monotonicallyIncreasingTime() - preload->discoveryTime())); |
82 DEFINE_STATIC_LOCAL(CustomCountHistogram, preloadDelayHistogram, | 82 DEFINE_STATIC_LOCAL(CustomCountHistogram, preloadDelayHistogram, |
83 ("WebCore.PreloadDelayMs", 0, 2000, 20)); | 83 ("WebCore.PreloadDelayMs", 0, 2000, 20)); |
84 preloadDelayHistogram.count(duration); | 84 preloadDelayHistogram.count(duration); |
85 | 85 |
86 Resource* resource = preload->start(m_document); | 86 Resource* resource = preload->start(m_document); |
87 | 87 |
88 if (resource && !resource->isLoaded() && | 88 if (resource && !resource->isLoaded() && |
89 preload->resourceType() == Resource::CSSStyleSheet) { | 89 preload->resourceType() == Resource::CSSStyleSheet) { |
90 Settings* settings = m_document->settings(); | 90 Settings* settings = m_document->settings(); |
91 if (settings && (settings->getCSSExternalScannerNoPreload() || | 91 if (settings && |
92 settings->getCSSExternalScannerPreload())) | 92 (settings->getCSSExternalScannerNoPreload() || |
| 93 settings->getCSSExternalScannerPreload())) |
93 m_cssPreloaders.insert(new CSSPreloaderResourceClient(resource, this)); | 94 m_cssPreloaders.insert(new CSSPreloaderResourceClient(resource, this)); |
94 } | 95 } |
95 } | 96 } |
96 | 97 |
97 } // namespace blink | 98 } // namespace blink |
OLD | NEW |