Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 } else { | 131 } else { |
| 132 // Cross-origin resources that are not suitably CORS-enabled may not loa d. | 132 // Cross-origin resources that are not suitably CORS-enabled may not loa d. |
| 133 if (!m_document.securityOrigin()->canRequest(url)) { | 133 if (!m_document.securityOrigin()->canRequest(url)) { |
| 134 corsPolicyPreventedLoad(); | 134 corsPolicyPreventedLoad(); |
| 135 return false; | 135 return false; |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 ResourceFetcher* fetcher = m_document.fetcher(); | 139 ResourceFetcher* fetcher = m_document.fetcher(); |
| 140 m_resource = fetcher->fetchRawResource(cueRequest); | 140 m_resource = fetcher->fetchRawResource(cueRequest); |
| 141 if (m_resource) | 141 if (!m_resource) |
| 142 m_resource->addClient(this); | 142 return false; |
| 143 | |
| 144 m_resource->addClient(this); | |
|
philipj_slow
2013/10/30 20:01:51
Too many blank lines around here? http://www.chrom
Nate Chapin
2013/10/30 20:06:10
The rules on blank lines are pretty loose. I'd lea
philipj_slow
2013/10/30 20:13:57
I've always wanted to be like you, so I'll go with
| |
| 143 | 145 |
| 144 m_client.cueLoadingStarted(this); | 146 m_client.cueLoadingStarted(this); |
| 145 | 147 |
| 146 return true; | 148 return true; |
| 147 } | 149 } |
| 148 | 150 |
| 149 void TextTrackLoader::newCuesParsed() | 151 void TextTrackLoader::newCuesParsed() |
| 150 { | 152 { |
| 151 if (m_cueLoadTimer.isActive()) | 153 if (m_cueLoadTimer.isActive()) |
| 152 return; | 154 return; |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 180 } | 182 } |
| 181 | 183 |
| 182 void TextTrackLoader::getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegi ons) | 184 void TextTrackLoader::getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegi ons) |
| 183 { | 185 { |
| 184 ASSERT(m_cueParser); | 186 ASSERT(m_cueParser); |
| 185 if (m_cueParser) | 187 if (m_cueParser) |
| 186 m_cueParser->getNewRegions(outputRegions); | 188 m_cueParser->getNewRegions(outputRegions); |
| 187 } | 189 } |
| 188 } | 190 } |
| 189 | 191 |
| OLD | NEW |