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

Side by Side Diff: chrome/browser/local_discovery/privet_traffic_detector.cc

Issue 502173004: Remove implicit conversions from scoped_refptr to T* in chrome/browser/local_discovery/ (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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/local_discovery/privet_traffic_detector.h" 5 #include "chrome/browser/local_discovery/privet_traffic_detector.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/sys_byteorder.h" 8 #include "base/sys_byteorder.h"
9 #include "net/base/dns_util.h" 9 #include "net/base/dns_util.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (IsPrivetPacket(rv)) { 171 if (IsPrivetPacket(rv)) {
172 socket_.reset(); 172 socket_.reset();
173 callback_runner_->PostTask(FROM_HERE, on_traffic_detected_); 173 callback_runner_->PostTask(FROM_HERE, on_traffic_detected_);
174 base::TimeDelta time_delta = base::Time::Now() - start_time_; 174 base::TimeDelta time_delta = base::Time::Now() - start_time_;
175 UMA_HISTOGRAM_LONG_TIMES("LocalDiscovery.DetectorTriggerTime", 175 UMA_HISTOGRAM_LONG_TIMES("LocalDiscovery.DetectorTriggerTime",
176 time_delta); 176 time_delta);
177 return net::OK; 177 return net::OK;
178 } 178 }
179 179
180 rv = socket_->RecvFrom( 180 rv = socket_->RecvFrom(
181 io_buffer_, 181 io_buffer_.get(),
182 io_buffer_->size(), 182 io_buffer_->size(),
183 &recv_addr_, 183 &recv_addr_,
184 base::Bind(base::IgnoreResult(&PrivetTrafficDetector::DoLoop), 184 base::Bind(base::IgnoreResult(&PrivetTrafficDetector::DoLoop),
185 base::Unretained(this))); 185 base::Unretained(this)));
186 } while (rv > 0); 186 } while (rv > 0);
187 187
188 if (rv != net::ERR_IO_PENDING) 188 if (rv != net::ERR_IO_PENDING)
189 return rv; 189 return rv;
190 190
191 return net::OK; 191 return net::OK;
192 } 192 }
193 193
194 } // namespace local_discovery 194 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privet_notifications_unittest.cc ('k') | chrome/browser/local_discovery/privet_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698