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

Unified Diff: cc/surfaces/surface_resource_holder.cc

Issue 2802023002: Remove SurfaceFactory And SurfaceFactoryClient (Closed)
Patch Set: Rebase SurfaceSynchronizationTest 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 | « cc/surfaces/surface_manager_unittest.cc ('k') | cc/surfaces/surface_synchronization_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_resource_holder.cc
diff --git a/cc/surfaces/surface_resource_holder.cc b/cc/surfaces/surface_resource_holder.cc
index dff955cbde28f294bf2c3cb0c5410366339e4b48..8d46b25fd034b9ccfcac8364b0387c6420eee3b1 100644
--- a/cc/surfaces/surface_resource_holder.cc
+++ b/cc/surfaces/surface_resource_holder.cc
@@ -11,12 +11,10 @@ SurfaceResourceHolder::SurfaceResourceHolder(
SurfaceResourceHolderClient* client)
: client_(client) {}
-SurfaceResourceHolder::~SurfaceResourceHolder() {
-}
+SurfaceResourceHolder::~SurfaceResourceHolder() = default;
SurfaceResourceHolder::ResourceRefs::ResourceRefs()
- : refs_received_from_child(0), refs_holding_resource_alive(0) {
-}
+ : refs_received_from_child(0), refs_holding_resource_alive(0) {}
void SurfaceResourceHolder::Reset() {
resource_id_info_map_.clear();
@@ -24,10 +22,8 @@ void SurfaceResourceHolder::Reset() {
void SurfaceResourceHolder::ReceiveFromChild(
const TransferableResourceArray& resources) {
- for (TransferableResourceArray::const_iterator it = resources.begin();
- it != resources.end();
- ++it) {
- ResourceRefs& ref = resource_id_info_map_[it->id];
+ for (const auto& resource : resources) {
+ ResourceRefs& ref = resource_id_info_map_[resource.id];
ref.refs_holding_resource_alive++;
ref.refs_received_from_child++;
}
« no previous file with comments | « cc/surfaces/surface_manager_unittest.cc ('k') | cc/surfaces/surface_synchronization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698