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

Unified Diff: components/search_engines/template_url_service_unittest.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/search_engines/template_url_service_unittest.cc
diff --git a/components/search_engines/template_url_service_unittest.cc b/components/search_engines/template_url_service_unittest.cc
index a0e3ab235599a8a05e4826ebfb8b9cb245815072..75abf4466eec925a60956831cbbd4275bfc4ffc2 100644
--- a/components/search_engines/template_url_service_unittest.cc
+++ b/components/search_engines/template_url_service_unittest.cc
@@ -5,6 +5,7 @@
#include "components/search_engines/template_url_service.h"
#include <stddef.h>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -324,7 +325,7 @@ TEST_F(TemplateURLServiceTest, AddUpdateRemove) {
base::Time now = base::Time::Now();
scoped_ptr<base::SimpleTestClock> clock(new base::SimpleTestClock);
clock->SetNow(now);
- model()->set_clock(clock.Pass());
+ model()->set_clock(std::move(clock));
// Mutate an element and verify it succeeded.
model()->ResetTemplateURL(loaded_url, ASCIIToUTF16("a"), ASCIIToUTF16("b"),
@@ -639,7 +640,7 @@ TEST_F(TemplateURLServiceTest, Reset) {
base::Time now = base::Time::Now();
scoped_ptr<base::SimpleTestClock> clock(new base::SimpleTestClock);
clock->SetNow(now);
- model()->set_clock(clock.Pass());
+ model()->set_clock(std::move(clock));
// Reset the short name, keyword, url and make sure it takes.
const base::string16 new_short_name(ASCIIToUTF16("a"));
@@ -1416,7 +1417,7 @@ TEST_F(TemplateURLServiceTest, DefaultExtensionEngine) {
new TemplateURL::AssociatedExtensionInfo(
TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION, "ext"));
extension_info->wants_to_be_default_engine = true;
- model()->AddExtensionControlledTURL(ext_dse, extension_info.Pass());
+ model()->AddExtensionControlledTURL(ext_dse, std::move(extension_info));
EXPECT_EQ(ext_dse, model()->GetDefaultSearchProvider());
model()->RemoveExtensionControlledTURL(
@@ -1442,7 +1443,7 @@ TEST_F(TemplateURLServiceTest, ExtensionEnginesNotPersist) {
new TemplateURL::AssociatedExtensionInfo(
TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION, "ext1"));
extension_info->wants_to_be_default_engine = false;
- model()->AddExtensionControlledTURL(ext_dse, extension_info.Pass());
+ model()->AddExtensionControlledTURL(ext_dse, std::move(extension_info));
EXPECT_EQ(user_dse, model()->GetDefaultSearchProvider());
ext_dse = CreateKeywordWithDate(
@@ -1452,7 +1453,7 @@ TEST_F(TemplateURLServiceTest, ExtensionEnginesNotPersist) {
extension_info.reset(new TemplateURL::AssociatedExtensionInfo(
TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION, "ext2"));
extension_info->wants_to_be_default_engine = true;
- model()->AddExtensionControlledTURL(ext_dse, extension_info.Pass());
+ model()->AddExtensionControlledTURL(ext_dse, std::move(extension_info));
EXPECT_EQ(ext_dse, model()->GetDefaultSearchProvider());
test_util()->ResetModel(true);
@@ -1500,7 +1501,7 @@ TEST_F(TemplateURLServiceTest, ExtensionEngineVsPolicy) {
new TemplateURL::AssociatedExtensionInfo(
TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION, "ext1"));
extension_info->wants_to_be_default_engine = true;
- model()->AddExtensionControlledTURL(ext_dse, extension_info.Pass());
+ model()->AddExtensionControlledTURL(ext_dse, std::move(extension_info));
EXPECT_EQ(ext_dse, model()->GetTemplateURLForKeyword(ASCIIToUTF16("ext1")));
EXPECT_TRUE(model()->is_default_search_managed());
actual_managed_default = model()->GetDefaultSearchProvider();

Powered by Google App Engine
This is Rietveld 408576698