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

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

Issue 2761693002: Wrapped PassRefPtrs in move where passed to RefPtr constructor. (Closed)
Patch Set: Added move wraps for multiple instances in 1 line. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/loader/resource/ImageResourceContent.h" 5 #include "core/loader/resource/ImageResourceContent.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "core/loader/resource/ImageResource.h" 9 #include "core/loader/resource/ImageResource.h"
10 #include "core/loader/resource/ImageResourceInfo.h" 10 #include "core/loader/resource/ImageResourceInfo.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const AtomicString& initiatorName) override {} 62 const AtomicString& initiatorName) override {}
63 63
64 const KURL m_url; 64 const KURL m_url;
65 const ResourceResponse m_response; 65 const ResourceResponse m_response;
66 const ResourceError m_error; 66 const ResourceError m_error;
67 }; 67 };
68 68
69 } // namespace 69 } // namespace
70 70
71 ImageResourceContent::ImageResourceContent(PassRefPtr<blink::Image> image) 71 ImageResourceContent::ImageResourceContent(PassRefPtr<blink::Image> image)
72 : m_image(image), m_isRefetchableDataFromDiskCache(true) { 72 : m_image(std::move(image)), m_isRefetchableDataFromDiskCache(true) {
73 DEFINE_STATIC_LOCAL(NullImageResourceInfo, nullInfo, 73 DEFINE_STATIC_LOCAL(NullImageResourceInfo, nullInfo,
74 (new NullImageResourceInfo())); 74 (new NullImageResourceInfo()));
75 m_info = &nullInfo; 75 m_info = &nullInfo;
76 } 76 }
77 77
78 ImageResourceContent* ImageResourceContent::fetch(FetchRequest& request, 78 ImageResourceContent* ImageResourceContent::fetch(FetchRequest& request,
79 ResourceFetcher* fetcher) { 79 ResourceFetcher* fetcher) {
80 // TODO(hiroshige): Remove direct references to ImageResource by making 80 // TODO(hiroshige): Remove direct references to ImageResource by making
81 // the dependencies around ImageResource and ImageResourceContent cleaner. 81 // the dependencies around ImageResource and ImageResourceContent cleaner.
82 ImageResource* resource = ImageResource::fetch(request, fetcher); 82 ImageResource* resource = ImageResource::fetch(request, fetcher);
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 477
478 const ResourceResponse& ImageResourceContent::response() const { 478 const ResourceResponse& ImageResourceContent::response() const {
479 return m_info->response(); 479 return m_info->response();
480 } 480 }
481 481
482 const ResourceError& ImageResourceContent::resourceError() const { 482 const ResourceError& ImageResourceContent::resourceError() const {
483 return m_info->resourceError(); 483 return m_info->resourceError();
484 } 484 }
485 485
486 } // namespace blink 486 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698