Index: base/scoped_observer.h |
diff --git a/base/scoped_observer.h b/base/scoped_observer.h |
index 5b0d53353bab913125335acc0d925987c60b7dae..3754ed57e1d27c3b98f59b8c41262c7d80de9507 100644 |
--- a/base/scoped_observer.h |
+++ b/base/scoped_observer.h |
@@ -9,7 +9,6 @@ |
#include <vector> |
#include "base/basictypes.h" |
-#include "base/logging.h" |
// ScopedObserver is used to keep track of the set of sources an object has |
// attached itself to as an observer. When ScopedObserver is destroyed it |
@@ -31,9 +30,7 @@ |
// Remove the object passed to the constructor as an observer from |source|. |
void Remove(Source* source) { |
- auto it = std::find(sources_.begin(), sources_.end(), source); |
- DCHECK(it != sources_.end()); |
- sources_.erase(it); |
+ sources_.erase(std::find(sources_.begin(), sources_.end(), source)); |
source->RemoveObserver(observer_); |
} |