| Index: chrome/browser/extensions/api/streams_private/streams_private_apitest.cc
|
| diff --git a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc
|
| index 60db11a7e86be9bb2a563eb05499ac8e8ebb036e..7394431cc2a636c7ca278176598ce41ebf95d8e3 100644
|
| --- a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc
|
| +++ b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc
|
| @@ -2,6 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include <utility>
|
| +
|
| #include "base/command_line.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/prefs/pref_service.h"
|
| @@ -60,7 +62,7 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) {
|
| if (request.relative_url == "/doc_path.doc") {
|
| response->set_code(net::HTTP_OK);
|
| response->set_content_type("application/msword");
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // For relative path "/spreadsheet_path.xls", return success response with
|
| @@ -71,7 +73,7 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) {
|
| // Test that multiple headers with the same name are merged.
|
| response->AddCustomHeader("Test-Header", "part1");
|
| response->AddCustomHeader("Test-Header", "part2");
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // For relative path "/text_path_attch.txt", return success response with
|
| @@ -83,7 +85,7 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) {
|
| response->set_content_type("text/plain");
|
| response->AddCustomHeader("Content-Disposition",
|
| "attachment; filename=test_path.txt");
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // For relative path "/test_path_attch.txt", return success response with
|
| @@ -92,7 +94,7 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) {
|
| response->set_code(net::HTTP_OK);
|
| response->set_content("txt content");
|
| response->set_content_type("text/plain");
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // A random HTML file to navigate to.
|
| @@ -100,7 +102,7 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) {
|
| response->set_code(net::HTTP_OK);
|
| response->set_content("html content");
|
| response->set_content_type("text/html");
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // RTF files for testing chrome.streamsPrivate.abort().
|
| @@ -108,19 +110,19 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) {
|
| request.relative_url == "/no_abort.rtf") {
|
| response->set_code(net::HTTP_OK);
|
| response->set_content_type("application/rtf");
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // Respond to /favicon.ico for navigating to the page.
|
| if (request.relative_url == "/favicon.ico") {
|
| response->set_code(net::HTTP_NOT_FOUND);
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // No other requests should be handled in the tests.
|
| EXPECT_TRUE(false) << "NOTREACHED!";
|
| response->set_code(net::HTTP_NOT_FOUND);
|
| - return response.Pass();
|
| + return std::move(response);
|
| }
|
|
|
| // Tests to verify that resources are correctly intercepted by
|
| @@ -186,7 +188,7 @@ class StreamsPrivateApiTest : public ExtensionApiTest {
|
| streams_private::OnExecuteMimeTypeHandler::Create(info)));
|
|
|
| extensions::EventRouter::Get(browser()->profile())
|
| - ->DispatchEventToExtension(test_extension_id_, event.Pass());
|
| + ->DispatchEventToExtension(test_extension_id_, std::move(event));
|
| }
|
|
|
| // Loads the test extension and set's up its file_browser_handler to handle
|
| @@ -411,7 +413,7 @@ IN_PROC_BROWSER_TEST_F(StreamsPrivateApiTest, DirectDownload) {
|
| params->set_file_path(target_path);
|
|
|
| // Start download of the URL with a path "/text_path.txt" on the test server.
|
| - download_manager->DownloadUrl(params.Pass());
|
| + download_manager->DownloadUrl(std::move(params));
|
|
|
| // Wait for the download to start.
|
| download_observer->WaitForFinished();
|
|
|