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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
index 3b04125a35373f2826840b85c5a3914624cbc65d..a8b027acf75d224d62a4517012347b67297041d1 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
@@ -6,6 +6,8 @@
#include "chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h"
+#include <utility>
+
#include "base/json/json_writer.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
@@ -50,10 +52,10 @@ void DispatchEvent(content::BrowserContext* browser_context,
EventRouter* event_router = EventRouter::Get(profile);
if (profile && event_router) {
scoped_ptr<Event> event(
- new Event(histogram_value, event_name, args.Pass()));
+ new Event(histogram_value, event_name, std::move(args)));
event->restrict_to_browser_context = profile;
event->filter_info = info;
- event_router->BroadcastEvent(event.Pass());
+ event_router->BroadcastEvent(std::move(event));
}
}
@@ -85,7 +87,7 @@ void DispatchOnBeforeNavigate(content::WebContents* web_contents,
DispatchEvent(web_contents->GetBrowserContext(),
events::WEB_NAVIGATION_ON_BEFORE_NAVIGATE,
- web_navigation::OnBeforeNavigate::kEventName, args.Pass(),
+ web_navigation::OnBeforeNavigate::kEventName, std::move(args),
validated_url);
}
@@ -125,7 +127,7 @@ void DispatchOnCommitted(events::HistogramValue histogram_value,
args->Append(dict);
DispatchEvent(web_contents->GetBrowserContext(), histogram_value, event_name,
- args.Pass(), url);
+ std::move(args), url);
}
// Constructs and dispatches an onDOMContentLoaded event.
@@ -144,7 +146,7 @@ void DispatchOnDOMContentLoaded(content::WebContents* web_contents,
DispatchEvent(web_contents->GetBrowserContext(),
events::WEB_NAVIGATION_ON_DOM_CONTENT_LOADED,
- web_navigation::OnDOMContentLoaded::kEventName, args.Pass(),
+ web_navigation::OnDOMContentLoaded::kEventName, std::move(args),
url);
}
@@ -164,7 +166,7 @@ void DispatchOnCompleted(content::WebContents* web_contents,
DispatchEvent(web_contents->GetBrowserContext(),
events::WEB_NAVIGATION_ON_COMPLETED,
- web_navigation::OnCompleted::kEventName, args.Pass(), url);
+ web_navigation::OnCompleted::kEventName, std::move(args), url);
}
// Constructs and dispatches an onCreatedNavigationTarget event.
@@ -197,7 +199,7 @@ void DispatchOnCreatedNavigationTarget(
DispatchEvent(browser_context,
events::WEB_NAVIGATION_ON_CREATED_NAVIGATION_TARGET,
web_navigation::OnCreatedNavigationTarget::kEventName,
- args.Pass(), target_url);
+ std::move(args), target_url);
}
// Constructs and dispatches an onErrorOccurred event.
@@ -218,7 +220,8 @@ void DispatchOnErrorOccurred(content::WebContents* web_contents,
DispatchEvent(web_contents->GetBrowserContext(),
events::WEB_NAVIGATION_ON_ERROR_OCCURRED,
- web_navigation::OnErrorOccurred::kEventName, args.Pass(), url);
+ web_navigation::OnErrorOccurred::kEventName, std::move(args),
+ url);
}
// Constructs and dispatches an onTabReplaced event.
@@ -237,7 +240,8 @@ void DispatchOnTabReplaced(
args->Append(dict);
DispatchEvent(browser_context, events::WEB_NAVIGATION_ON_TAB_REPLACED,
- web_navigation::OnTabReplaced::kEventName, args.Pass(), GURL());
+ web_navigation::OnTabReplaced::kEventName, std::move(args),
+ GURL());
}
} // namespace web_navigation_api_helpers

Powered by Google App Engine
This is Rietveld 408576698