Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp

Issue 2869733004: Fix ImageResourceContent::Create()'s GetContentStatus() (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
index 221aca37be208398a987be1435928d4ab77884bc..a4764783512a1b4ae7ef8c0c1a07366a06bb4bdd 100644
--- a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
@@ -74,6 +74,14 @@ ImageResourceContent::ImageResourceContent(PassRefPtr<blink::Image> image)
info_ = &null_info;
}
+ImageResourceContent* ImageResourceContent::CreateLoaded(
+ PassRefPtr<blink::Image> image) {
+ DCHECK(image);
+ ImageResourceContent* content = new ImageResourceContent(std::move(image));
+ content->content_status_ = ResourceStatus::kCached;
+ return content;
+}
+
ImageResourceContent* ImageResourceContent::Fetch(FetchParameters& params,
ResourceFetcher* fetcher) {
// TODO(hiroshige): Remove direct references to ImageResource by making
« no previous file with comments | « third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698