Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 Resource::allClientsAndObserversRemoved(); | 168 Resource::allClientsAndObserversRemoved(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void FontResource::checkNotify() { | 171 void FontResource::checkNotify() { |
| 172 m_fontLoadShortLimitTimer.stop(); | 172 m_fontLoadShortLimitTimer.stop(); |
| 173 m_fontLoadLongLimitTimer.stop(); | 173 m_fontLoadLongLimitTimer.stop(); |
| 174 | 174 |
| 175 Resource::checkNotify(); | 175 Resource::checkNotify(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 bool FontResource::isLowPriorityLoadingAllowedForRemoteFont() const { | |
| 179 assert(!url().protocolIsData()); | |
| 180 assert(!isLoaded()); | |
|
hiroshige
2016/11/15 06:05:41
Please use DCHECK() instead of assert().
tbansal1
2016/11/15 08:17:04
Done. Thanks for catching this.
| |
| 181 ResourceClientWalker<FontResourceClient> walker(clients()); | |
| 182 while (FontResourceClient* client = walker.next()) { | |
| 183 if (!client->isLowPriorityLoadingAllowedForRemoteFont()) { | |
| 184 return false; | |
| 185 } | |
| 186 } | |
| 187 return true; | |
| 188 } | |
| 189 | |
| 178 } // namespace blink | 190 } // namespace blink |
| OLD | NEW |