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

Unified Diff: chrome/browser/chromeos/swap_metrics.cc

Issue 18308004: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/swap_metrics.cc
diff --git a/chrome/browser/chromeos/swap_metrics.cc b/chrome/browser/chromeos/swap_metrics.cc
index 6b25be096af0342b76364e965178f49f3d24563b..efebac33bc87c2c7552bfbc149e206fea1a75c83 100644
--- a/chrome/browser/chromeos/swap_metrics.cc
+++ b/chrome/browser/chromeos/swap_metrics.cc
@@ -348,7 +348,7 @@ SwapMetrics::SwapMetrics() : browser_(NULL) {
}
SwapMetrics::~SwapMetrics() {
- if (backend_)
+ if (backend_.get())
backend_->CancelOnUIThread();
ash::Shell::GetInstance()->RemovePreTargetHandler(this);
BrowserList::RemoveObserver(this);
@@ -413,7 +413,7 @@ void SwapMetrics::PostTaskRecordMetrics(scoped_refptr<Backend> backend,
void SwapMetrics::StartMetricsCollection(const std::string& reason) {
// Cancel any existing metrics run.
- if (backend_)
+ if (backend_.get())
backend_->CancelOnUIThread();
backend_ = new Backend(reason);
PostTaskRecordMetrics(backend_, 0, kMetricsDelayMs[0]);

Powered by Google App Engine
This is Rietveld 408576698