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

Side by Side Diff: chrome/browser/extensions/api/dial/dial_service.cc

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors (ChromeOS unit tests). Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/dial/dial_service.h" 5 #include "chrome/browser/extensions/api/dial/dial_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 void DialServiceImpl::AddObserver(Observer* observer) { 400 void DialServiceImpl::AddObserver(Observer* observer) {
401 DCHECK(thread_checker_.CalledOnValidThread()); 401 DCHECK(thread_checker_.CalledOnValidThread());
402 observer_list_.AddObserver(observer); 402 observer_list_.AddObserver(observer);
403 } 403 }
404 404
405 void DialServiceImpl::RemoveObserver(Observer* observer) { 405 void DialServiceImpl::RemoveObserver(Observer* observer) {
406 DCHECK(thread_checker_.CalledOnValidThread()); 406 DCHECK(thread_checker_.CalledOnValidThread());
407 observer_list_.RemoveObserver(observer); 407 observer_list_.RemoveObserver(observer);
408 } 408 }
409 409
410 bool DialServiceImpl::HasObserver(Observer* observer) { 410 bool DialServiceImpl::HasObserver(const Observer* observer) const {
411 DCHECK(thread_checker_.CalledOnValidThread()); 411 DCHECK(thread_checker_.CalledOnValidThread());
412 return observer_list_.HasObserver(observer); 412 return observer_list_.HasObserver(observer);
413 } 413 }
414 414
415 bool DialServiceImpl::Discover() { 415 bool DialServiceImpl::Discover() {
416 DCHECK(thread_checker_.CalledOnValidThread()); 416 DCHECK(thread_checker_.CalledOnValidThread());
417 if (discovery_active_) { 417 if (discovery_active_) {
418 VLOG(2) << "Discovery is already active - returning."; 418 VLOG(2) << "Discovery is already active - returning.";
419 return false; 419 return false;
420 } 420 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 for (ScopedVector<DialSocket>::const_iterator iter = dial_sockets_.begin(); 615 for (ScopedVector<DialSocket>::const_iterator iter = dial_sockets_.begin();
616 iter != dial_sockets_.end(); 616 iter != dial_sockets_.end();
617 ++iter) { 617 ++iter) {
618 if (!((*iter)->IsClosed())) 618 if (!((*iter)->IsClosed()))
619 return true; 619 return true;
620 } 620 }
621 return false; 621 return false;
622 } 622 }
623 623
624 } // namespace extensions 624 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/dial/dial_service.h ('k') | chrome/browser/search/instant_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698