| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 m_state = RedirectBlocked; | 292 m_state = RedirectBlocked; |
| 293 } | 293 } |
| 294 | 294 |
| 295 void RawResourceClientStateChecker::dataSent() | 295 void RawResourceClientStateChecker::dataSent() |
| 296 { | 296 { |
| 297 SECURITY_CHECK(m_state == Started); | 297 SECURITY_CHECK(m_state == Started); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void RawResourceClientStateChecker::responseReceived() | 300 void RawResourceClientStateChecker::responseReceived() |
| 301 { | 301 { |
| 302 SECURITY_CHECK(m_state == Started); | 302 // TODO(hiroshige): Temporarily we use DCHECK() here instead of CHECK(), |
| 303 // due to crbug.com/640960. |
| 304 SECURITY_DCHECK(m_state == Started); |
| 303 m_state = ResponseReceived; | 305 m_state = ResponseReceived; |
| 304 } | 306 } |
| 305 | 307 |
| 306 void RawResourceClientStateChecker::setSerializedCachedMetadata() | 308 void RawResourceClientStateChecker::setSerializedCachedMetadata() |
| 307 { | 309 { |
| 308 SECURITY_CHECK(m_state == ResponseReceived); | 310 SECURITY_CHECK(m_state == ResponseReceived); |
| 309 m_state = SetSerializedCachedMetadata; | 311 m_state = SetSerializedCachedMetadata; |
| 310 } | 312 } |
| 311 | 313 |
| 312 void RawResourceClientStateChecker::dataReceived() | 314 void RawResourceClientStateChecker::dataReceived() |
| (...skipping 10 matching lines...) Expand all Loading... |
| 323 | 325 |
| 324 void RawResourceClientStateChecker::notifyFinished(Resource* resource) | 326 void RawResourceClientStateChecker::notifyFinished(Resource* resource) |
| 325 { | 327 { |
| 326 SECURITY_CHECK(m_state != NotAddedAsClient); | 328 SECURITY_CHECK(m_state != NotAddedAsClient); |
| 327 SECURITY_CHECK(m_state != NotifyFinished); | 329 SECURITY_CHECK(m_state != NotifyFinished); |
| 328 SECURITY_CHECK(resource->errorOccurred() || (m_state == ResponseReceived ||
m_state == SetSerializedCachedMetadata || m_state == DataReceived || m_state ==
DataDownloaded)); | 330 SECURITY_CHECK(resource->errorOccurred() || (m_state == ResponseReceived ||
m_state == SetSerializedCachedMetadata || m_state == DataReceived || m_state ==
DataDownloaded)); |
| 329 m_state = NotifyFinished; | 331 m_state = NotifyFinished; |
| 330 } | 332 } |
| 331 | 333 |
| 332 } // namespace blink | 334 } // namespace blink |
| OLD | NEW |