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

Unified Diff: cc/surfaces/surface_resource_holder.cc

Issue 2802023002: Remove SurfaceFactory And SurfaceFactoryClient (Closed)
Patch Set: Merge unit tests Created 3 years, 8 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
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..8499400251b0517ec4c32e5d2d0f01eb3c2c5ffd 100644
--- a/cc/surfaces/surface_resource_holder.cc
+++ b/cc/surfaces/surface_resource_holder.cc
@@ -6,17 +6,14 @@
#include "cc/surfaces/surface_resource_holder_client.h"
namespace cc {
-
SurfaceResourceHolder::SurfaceResourceHolder(
SurfaceResourceHolderClient* client)
: client_(client) {}
-SurfaceResourceHolder::~SurfaceResourceHolder() {
-}
+SurfaceResourceHolder::~SurfaceResourceHolder() {}
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();
@@ -25,8 +22,7 @@ void SurfaceResourceHolder::Reset() {
void SurfaceResourceHolder::ReceiveFromChild(
const TransferableResourceArray& resources) {
for (TransferableResourceArray::const_iterator it = resources.begin();
Fady Samuel 2017/04/26 00:44:14 for (const auto& resource : resources) { ... }
Alex Z. 2017/04/27 22:10:01 const auto& doesn't work since we have ++it. I cha
- it != resources.end();
- ++it) {
+ it != resources.end(); ++it) {
ResourceRefs& ref = resource_id_info_map_[it->id];
ref.refs_holding_resource_alive++;
ref.refs_received_from_child++;

Powered by Google App Engine
This is Rietveld 408576698