Commit 6b835fc4 authored by Scott Little's avatar Scott Little Committed by Commit Bot

Clean up unnecessary copies in translate_prefs.

This CL cleans up unnecessary copies of std::strings and other objects
in components/translate/core/browser/translate_prefs.cc, as well as some
miscellaneous cleanup in this file.

This CL does not change any functionality, and is only clean up.

Bug: 1109032
Change-Id: I930d64accbf14e0b4163728a8ce23c1028e3f531
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321768
Commit-Queue: Scott Little <sclittle@chromium.org>
Reviewed-by: default avatarMegan Jablonski <megjablon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792850}
parent 246c27f8
......@@ -102,7 +102,11 @@ class DenialTimeUpdate {
// Preferences and Language Settings.
struct TranslateLanguageInfo {
TranslateLanguageInfo();
TranslateLanguageInfo(const TranslateLanguageInfo&);
TranslateLanguageInfo(TranslateLanguageInfo&&) noexcept;
TranslateLanguageInfo& operator=(const TranslateLanguageInfo&);
TranslateLanguageInfo& operator=(TranslateLanguageInfo&&) noexcept;
// This ISO code of the language.
std::string code;
......@@ -200,7 +204,7 @@ class TranslatePrefs {
// skip those languages while rearranging the list.
void RearrangeLanguage(const std::string& language,
RearrangeSpecifier where,
const int offset,
int offset,
const std::vector<std::string>& enabled_languages);
// Sets the language order to the provided order.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment