| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 // ImageResource lies isLoading() == false after the first part is loaded. | 411 // ImageResource lies isLoading() == false after the first part is loaded. |
| 412 return resource && resource->loader(); | 412 return resource && resource->loader(); |
| 413 } | 413 } |
| 414 | 414 |
| 415 bool Internals::isLoadingFromMemoryCache(const String& url) { | 415 bool Internals::isLoadingFromMemoryCache(const String& url) { |
| 416 if (!m_document) | 416 if (!m_document) |
| 417 return false; | 417 return false; |
| 418 const String cacheIdentifier = m_document->fetcher()->getCacheIdentifier(); | 418 const String cacheIdentifier = m_document->fetcher()->getCacheIdentifier(); |
| 419 Resource* resource = memoryCache()->resourceForURL( | 419 Resource* resource = memoryCache()->resourceForURL( |
| 420 m_document->completeURL(url), cacheIdentifier); | 420 m_document->completeURL(url), cacheIdentifier); |
| 421 return resource && resource->getStatus() == Resource::Cached; | 421 return resource && resource->getStatus() == ResourceStatus::Cached; |
| 422 } | 422 } |
| 423 | 423 |
| 424 int Internals::getResourcePriority(const String& url, Document* document) { | 424 int Internals::getResourcePriority(const String& url, Document* document) { |
| 425 if (!document) | 425 if (!document) |
| 426 return ResourceLoadPriority::ResourceLoadPriorityUnresolved; | 426 return ResourceLoadPriority::ResourceLoadPriorityUnresolved; |
| 427 | 427 |
| 428 Resource* resource = document->fetcher()->allResources().get( | 428 Resource* resource = document->fetcher()->allResources().get( |
| 429 URLTestHelpers::toKURL(url.utf8().data())); | 429 URLTestHelpers::toKURL(url.utf8().data())); |
| 430 | 430 |
| 431 if (!resource) | 431 if (!resource) |
| (...skipping 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3092 | 3092 |
| 3093 void Internals::crash() { | 3093 void Internals::crash() { |
| 3094 CHECK(false) << "Intentional crash"; | 3094 CHECK(false) << "Intentional crash"; |
| 3095 } | 3095 } |
| 3096 | 3096 |
| 3097 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3097 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
| 3098 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3098 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
| 3099 } | 3099 } |
| 3100 | 3100 |
| 3101 } // namespace blink | 3101 } // namespace blink |
| OLD | NEW |