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

Unified Diff: components/page_load_metrics/browser/metrics_web_contents_observer.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 years 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: components/page_load_metrics/browser/metrics_web_contents_observer.cc
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.cc b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
index e5d6fae723ab5a21cf48a7d5a9ecc923bb89b156..ab15c52e0911ef06af216c8a870ba0c6b19b33b6 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.cc
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/location.h"
#include "base/logging.h"
@@ -413,7 +414,7 @@ void PageLoadTracker::RecordRappor(const PageLoadExtraInfo& info) {
sample->SetFlagsField("IsSlow", first_contentful_paint.InSecondsF() >= 10,
1);
rappor_service->RecordSampleObj(kRapporMetricsNameCoarseTiming,
- sample.Pass());
+ std::move(sample));
}
}
@@ -423,7 +424,7 @@ MetricsWebContentsObserver::MetricsWebContentsObserver(
scoped_ptr<PageLoadMetricsEmbedderInterface> embedder_interface)
: content::WebContentsObserver(web_contents),
in_foreground_(false),
- embedder_interface_(embedder_interface.Pass()) {}
+ embedder_interface_(std::move(embedder_interface)) {}
MetricsWebContentsObserver* MetricsWebContentsObserver::CreateForWebContents(
content::WebContents* web_contents,
@@ -432,8 +433,8 @@ MetricsWebContentsObserver* MetricsWebContentsObserver::CreateForWebContents(
MetricsWebContentsObserver* metrics = FromWebContents(web_contents);
if (!metrics) {
- metrics =
- new MetricsWebContentsObserver(web_contents, embedder_interface.Pass());
+ metrics = new MetricsWebContentsObserver(web_contents,
+ std::move(embedder_interface));
web_contents->SetUserData(UserDataKey(), metrics);
}
return metrics;
@@ -521,7 +522,7 @@ void MetricsWebContentsObserver::DidFinishNavigation(
AbortTypeForPageTransition(navigation_handle->GetPageTransition()),
navigation_handle->NavigationStart());
- committed_load_ = finished_nav.Pass();
+ committed_load_ = std::move(finished_nav);
aborted_provisional_loads_.clear();
const GURL& browser_url = web_contents()->GetLastCommittedURL();

Powered by Google App Engine
This is Rietveld 408576698