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

Unified Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (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
Index: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index a0df26f884100d673c17bec1be167c25f1e57b17..c9d113fd6025caf53e4ccf184a5626712bff11f2 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -5,8 +5,8 @@
#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
#include <stddef.h>
-
#include <functional>
+#include <utility>
#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
@@ -230,7 +230,7 @@ bool SpellcheckCustomDictionary::AddWord(const std::string& word) {
Apply(*dictionary_change);
Notify(*dictionary_change);
Sync(*dictionary_change);
- Save(dictionary_change.Pass());
+ Save(std::move(dictionary_change));
return result == VALID_CHANGE;
}
@@ -242,7 +242,7 @@ bool SpellcheckCustomDictionary::RemoveWord(const std::string& word) {
Apply(*dictionary_change);
Notify(*dictionary_change);
Sync(*dictionary_change);
- Save(dictionary_change.Pass());
+ Save(std::move(dictionary_change));
return result == VALID_CHANGE;
}
@@ -294,8 +294,8 @@ syncer::SyncMergeResult SpellcheckCustomDictionary::MergeDataAndStartSyncing(
DCHECK(sync_processor.get());
DCHECK(sync_error_handler.get());
DCHECK_EQ(syncer::DICTIONARY, type);
- sync_processor_ = sync_processor.Pass();
- sync_error_handler_ = sync_error_handler.Pass();
+ sync_processor_ = std::move(sync_processor);
+ sync_error_handler_ = std::move(sync_error_handler);
// Build a list of words to add locally.
scoped_ptr<Change> to_change_locally(new Change);
@@ -313,7 +313,7 @@ syncer::SyncMergeResult SpellcheckCustomDictionary::MergeDataAndStartSyncing(
// Add remote words locally.
Apply(*to_change_locally);
Notify(*to_change_locally);
- Save(to_change_locally.Pass());
+ Save(std::move(to_change_locally));
// Send local changes to the sync server.
syncer::SyncMergeResult result(type);
@@ -376,7 +376,7 @@ syncer::SyncError SpellcheckCustomDictionary::ProcessSyncChanges(
dictionary_change->Sanitize(GetWords());
Apply(*dictionary_change);
Notify(*dictionary_change);
- Save(dictionary_change.Pass());
+ Save(std::move(dictionary_change));
return syncer::SyncError();
}

Powered by Google App Engine
This is Rietveld 408576698