diff options
author | dcheng <dcheng@chromium.org> | 2015-12-18 09:48:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 17:48:52 +0000 |
commit | e59eca16010c109a5e3e4922189c8b264d34caa9 (patch) | |
tree | 838815399c6364a99a465938df9978aeaf75c766 /extensions/shell | |
parent | 5100baf1eac806abbdaaf8002887aacf652f34e5 (diff) | |
download | chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.zip chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.gz chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.bz2 |
Convert Pass()→std::move() in //extensions
BUG=557422
Review URL: https://codereview.chromium.org/1537893002
Cr-Commit-Position: refs/heads/master@{#366120}
Diffstat (limited to 'extensions/shell')
6 files changed, 28 insertions, 25 deletions
diff --git a/extensions/shell/browser/media_capture_util.cc b/extensions/shell/browser/media_capture_util.cc index d8a11a8..6f4660c 100644 --- a/extensions/shell/browser/media_capture_util.cc +++ b/extensions/shell/browser/media_capture_util.cc @@ -5,6 +5,7 @@ #include "extensions/shell/browser/media_capture_util.h" #include <string> +#include <utility> #include "base/callback.h" #include "base/logging.h" @@ -64,10 +65,9 @@ void GrantMediaStreamRequest(content::WebContents* web_contents, // TODO(jamescook): Should we show a recording icon somewhere? If so, where? scoped_ptr<MediaStreamUI> ui; - callback.Run(devices, - devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE - : content::MEDIA_DEVICE_OK, - ui.Pass()); + callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE + : content::MEDIA_DEVICE_OK, + std::move(ui)); } void VerifyMediaAccessPermission(content::MediaStreamType type, diff --git a/extensions/shell/browser/shell_browser_context.cc b/extensions/shell/browser/shell_browser_context.cc index 745770b..b38661b 100644 --- a/extensions/shell/browser/shell_browser_context.cc +++ b/extensions/shell/browser/shell_browser_context.cc @@ -4,6 +4,8 @@ #include "extensions/shell/browser/shell_browser_context.h" +#include <utility> + #include "base/command_line.h" #include "components/guest_view/browser/guest_view_manager.h" #include "content/public/browser/browser_thread.h" @@ -47,19 +49,14 @@ net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( content::URLRequestInterceptorScopedVector request_interceptors, InfoMap* extension_info_map) { DCHECK(!url_request_context_getter()); - set_url_request_context_getter( - new ShellURLRequestContextGetter( - this, - IgnoreCertificateErrors(), - GetPath(), - content::BrowserThread::UnsafeGetMessageLoopForThread( - content::BrowserThread::IO), - content::BrowserThread::UnsafeGetMessageLoopForThread( - content::BrowserThread::FILE), - protocol_handlers, - request_interceptors.Pass(), - nullptr /* net_log */, - extension_info_map)); + set_url_request_context_getter(new ShellURLRequestContextGetter( + this, IgnoreCertificateErrors(), GetPath(), + content::BrowserThread::UnsafeGetMessageLoopForThread( + content::BrowserThread::IO), + content::BrowserThread::UnsafeGetMessageLoopForThread( + content::BrowserThread::FILE), + protocol_handlers, std::move(request_interceptors), nullptr /* net_log */, + extension_info_map)); resource_context_->set_url_request_context_getter( url_request_context_getter()); content::BrowserThread::PostTask( diff --git a/extensions/shell/browser/shell_content_browser_client.cc b/extensions/shell/browser/shell_content_browser_client.cc index 06cf81b..044f0461 100644 --- a/extensions/shell/browser/shell_content_browser_client.cc +++ b/extensions/shell/browser/shell_content_browser_client.cc @@ -4,6 +4,8 @@ #include "extensions/shell/browser/shell_content_browser_client.h" +#include <utility> + #include "base/command_line.h" #include "components/guest_view/browser/guest_view_message_filter.h" #include "content/public/browser/browser_thread.h" @@ -126,7 +128,7 @@ net::URLRequestContextGetter* ShellContentBrowserClient::CreateRequestContext( extension_info_map) .release()); return browser_main_parts_->browser_context()->CreateRequestContext( - protocol_handlers, request_interceptors.Pass(), extension_info_map); + protocol_handlers, std::move(request_interceptors), extension_info_map); } bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { diff --git a/extensions/shell/browser/shell_extensions_browser_client.cc b/extensions/shell/browser/shell_extensions_browser_client.cc index a3ec44a..fc53b92 100644 --- a/extensions/shell/browser/shell_extensions_browser_client.cc +++ b/extensions/shell/browser/shell_extensions_browser_client.cc @@ -4,6 +4,8 @@ #include "extensions/shell/browser/shell_extensions_browser_client.h" +#include <utility> + #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" @@ -213,8 +215,9 @@ void ShellExtensionsBrowserClient::BroadcastEventToRenderers( return; } - scoped_ptr<Event> event(new Event(histogram_value, event_name, args.Pass())); - EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass()); + scoped_ptr<Event> event( + new Event(histogram_value, event_name, std::move(args))); + EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event)); } net::NetLog* ShellExtensionsBrowserClient::GetNetLog() { diff --git a/extensions/shell/browser/shell_url_request_context_getter.cc b/extensions/shell/browser/shell_url_request_context_getter.cc index 4216a3e..8ee74b2 100644 --- a/extensions/shell/browser/shell_url_request_context_getter.cc +++ b/extensions/shell/browser/shell_url_request_context_getter.cc @@ -4,6 +4,8 @@ #include "extensions/shell/browser/shell_url_request_context_getter.h" +#include <utility> + #include "base/memory/scoped_ptr.h" #include "content/public/browser/resource_request_info.h" #include "extensions/browser/info_map.h" @@ -26,11 +28,10 @@ ShellURLRequestContextGetter::ShellURLRequestContextGetter( io_loop, file_loop, protocol_handlers, - request_interceptors.Pass(), + std::move(request_interceptors), net_log), browser_context_(browser_context), - extension_info_map_(extension_info_map) { -} + extension_info_map_(extension_info_map) {} ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { } diff --git a/extensions/shell/common/shell_extensions_client.cc b/extensions/shell/common/shell_extensions_client.cc index 4a37b09..5153eea 100644 --- a/extensions/shell/common/shell_extensions_client.cc +++ b/extensions/shell/common/shell_extensions_client.cc @@ -115,7 +115,7 @@ scoped_ptr<FeatureProvider> ShellExtensionsClient::CreateFeatureProvider( } else { NOTREACHED(); } - return provider.Pass(); + return provider; } scoped_ptr<JSONFeatureProviderSource> @@ -136,7 +136,7 @@ ShellExtensionsClient::CreateFeatureProviderSource( NOTREACHED(); source.reset(); } - return source.Pass(); + return source; } void ShellExtensionsClient::FilterHostPermissions( |