| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/page_load_metrics/metrics_web_contents_observer.h" | 5 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 if (observer_) { | 660 if (observer_) { |
| 661 observer_->RemoveTestingObserver(this); | 661 observer_->RemoveTestingObserver(this); |
| 662 observer_ = nullptr; | 662 observer_ = nullptr; |
| 663 } | 663 } |
| 664 } | 664 } |
| 665 | 665 |
| 666 void MetricsWebContentsObserver::TestingObserver::OnGoingAway() { | 666 void MetricsWebContentsObserver::TestingObserver::OnGoingAway() { |
| 667 observer_ = nullptr; | 667 observer_ = nullptr; |
| 668 } | 668 } |
| 669 | 669 |
| 670 void MetricsWebContentsObserver::BroadcastEventToObservers( |
| 671 const void* const event_key) { |
| 672 if (committed_load_) |
| 673 committed_load_->BroadcastEventToObservers(event_key); |
| 674 } |
| 675 |
| 670 } // namespace page_load_metrics | 676 } // namespace page_load_metrics |
| OLD | NEW |