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

Unified Diff: chrome/browser/ui/apps/chrome_app_delegate.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/ui/app_list/test/fast_show_pickler_unittest.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/apps/chrome_app_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc
index 467121a0467b296166f740a3315d696e8366df20..aebb117481eb0cef93839a2c1dacea5a9db7cf0d 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/apps/chrome_app_delegate.h"
+#include <utility>
+
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/stringprintf.h"
@@ -84,7 +86,7 @@ class OpenURLFromTabBasedOnBrowserDefault
public:
OpenURLFromTabBasedOnBrowserDefault(scoped_ptr<content::WebContents> source,
const content::OpenURLParams& params)
- : source_(source.Pass()), params_(params) {}
+ : source_(std::move(source)), params_(params) {}
// Opens a URL when called with the result of if this is the default system
// browser or not.
@@ -124,7 +126,7 @@ void ChromeAppDelegate::RelinquishKeepAliveAfterTimeout(
// ChromeAppDelegate which also resets the ScopedKeepAlive. To avoid this,
// move the ScopedKeepAlive out to here and let it fall out of scope.
if (chrome_app_delegate.get() && chrome_app_delegate->is_hidden_)
- scoped_ptr<ScopedKeepAlive>(chrome_app_delegate->keep_alive_.Pass());
+ scoped_ptr<ScopedKeepAlive>(std::move(chrome_app_delegate->keep_alive_));
}
class ChromeAppDelegate::NewWindowContentsDelegate
@@ -155,7 +157,7 @@ ChromeAppDelegate::NewWindowContentsDelegate::OpenURLFromTab(
scoped_refptr<ShellIntegration::DefaultWebClientWorker>
check_if_default_browser_worker =
new ShellIntegration::DefaultBrowserWorker(
- new OpenURLFromTabBasedOnBrowserDefault(owned_source.Pass(),
+ new OpenURLFromTabBasedOnBrowserDefault(std::move(owned_source),
params));
// Object lifetime notes: The OpenURLFromTabBasedOnBrowserDefault is owned
// by check_if_default_browser_worker. StartCheckIsDefault() takes lifetime
@@ -169,7 +171,7 @@ ChromeAppDelegate::NewWindowContentsDelegate::OpenURLFromTab(
ChromeAppDelegate::ChromeAppDelegate(scoped_ptr<ScopedKeepAlive> keep_alive)
: has_been_shown_(false),
is_hidden_(true),
- keep_alive_(keep_alive.Pass()),
+ keep_alive_(std::move(keep_alive)),
new_window_contents_delegate_(new NewWindowContentsDelegate()),
weak_factory_(this) {
registrar_.Add(this,
« no previous file with comments | « chrome/browser/ui/app_list/test/fast_show_pickler_unittest.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698