OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
7 rights reserved. | 7 rights reserved. |
8 | 8 |
9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 encoded_size_memory_usage_ = 0; | 406 encoded_size_memory_usage_ = 0; |
407 } | 407 } |
408 | 408 |
409 void Resource::SetDataBufferingPolicy( | 409 void Resource::SetDataBufferingPolicy( |
410 DataBufferingPolicy data_buffering_policy) { | 410 DataBufferingPolicy data_buffering_policy) { |
411 options_.data_buffering_policy = data_buffering_policy; | 411 options_.data_buffering_policy = data_buffering_policy; |
412 ClearData(); | 412 ClearData(); |
413 SetEncodedSize(0); | 413 SetEncodedSize(0); |
414 } | 414 } |
415 | 415 |
416 void Resource::GetError(const ResourceError& error) { | 416 void Resource::FinishAsError(const ResourceError& error) { |
417 DCHECK(!error.IsNull()); | 417 DCHECK(!error.IsNull()); |
418 error_ = error; | 418 error_ = error; |
419 is_revalidating_ = false; | 419 is_revalidating_ = false; |
420 | 420 |
421 if (error_.IsCancellation() || !IsPreloaded()) | 421 if (error_.IsCancellation() || !IsPreloaded()) |
422 GetMemoryCache()->Remove(this); | 422 GetMemoryCache()->Remove(this); |
423 | 423 |
424 if (!ErrorOccurred()) | 424 if (!ErrorOccurred()) |
425 SetStatus(ResourceStatus::kLoadError); | 425 SetStatus(ResourceStatus::kLoadError); |
426 DCHECK(ErrorOccurred()); | 426 DCHECK(ErrorOccurred()); |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 case Resource::kMedia: | 1120 case Resource::kMedia: |
1121 case Resource::kManifest: | 1121 case Resource::kManifest: |
1122 case Resource::kMock: | 1122 case Resource::kMock: |
1123 return false; | 1123 return false; |
1124 } | 1124 } |
1125 NOTREACHED(); | 1125 NOTREACHED(); |
1126 return false; | 1126 return false; |
1127 } | 1127 } |
1128 | 1128 |
1129 } // namespace blink | 1129 } // namespace blink |
OLD | NEW |