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

Side by Side Diff: components/invalidation/invalidation.cc

Issue 503353002: Remove implicit conversions from scoped_refptr to T* in components/invalidation/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/invalidation/invalidation.h" 5 #include "components/invalidation/invalidation.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 void Invalidation::SetAckHandler( 114 void Invalidation::SetAckHandler(
115 base::WeakPtr<AckHandler> handler, 115 base::WeakPtr<AckHandler> handler,
116 scoped_refptr<base::SequencedTaskRunner> handler_task_runner) { 116 scoped_refptr<base::SequencedTaskRunner> handler_task_runner) {
117 ack_handler_ = handler; 117 ack_handler_ = handler;
118 ack_handler_task_runner_ = handler_task_runner; 118 ack_handler_task_runner_ = handler_task_runner;
119 } 119 }
120 120
121 bool Invalidation::SupportsAcknowledgement() const { 121 bool Invalidation::SupportsAcknowledgement() const {
122 return !!ack_handler_task_runner_; 122 return !!ack_handler_task_runner_.get();
123 } 123 }
124 124
125 void Invalidation::Acknowledge() const { 125 void Invalidation::Acknowledge() const {
126 if (SupportsAcknowledgement()) { 126 if (SupportsAcknowledgement()) {
127 ack_handler_task_runner_->PostTask( 127 ack_handler_task_runner_->PostTask(
128 FROM_HERE, 128 FROM_HERE,
129 base::Bind(&AckHandler::Acknowledge, ack_handler_, id_, ack_handle_)); 129 base::Bind(&AckHandler::Acknowledge, ack_handler_, id_, ack_handle_));
130 } 130 }
131 } 131 }
132 132
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const std::string& payload, 170 const std::string& payload,
171 AckHandle ack_handle) 171 AckHandle ack_handle)
172 : id_(id), 172 : id_(id),
173 is_unknown_version_(is_unknown_version), 173 is_unknown_version_(is_unknown_version),
174 version_(version), 174 version_(version),
175 payload_(payload), 175 payload_(payload),
176 ack_handle_(ack_handle) { 176 ack_handle_(ack_handle) {
177 } 177 }
178 178
179 } // namespace syncer 179 } // namespace syncer
OLDNEW
« no previous file with comments | « components/invalidation/gcm_network_channel.cc ('k') | components/invalidation/non_blocking_invalidator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698