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

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

Issue 2695663003: Remove last usages of ScopedVector in extensions/ (Closed)
Patch Set: remove rest of the (unused) includes Created 3 years, 10 months 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_service.cc
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index e60a310ed8d76e393fe95b924ce8eb236f05aad7..da56edfc10ef0147c3c4e17ff7bc32eb8ee1cef4 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -188,7 +188,7 @@ void SpellcheckService::InitForRenderer(content::RenderProcessHost* process) {
PrefService* prefs = user_prefs::UserPrefs::Get(context);
std::vector<SpellCheckBDictLanguage> bdict_languages;
- for (const auto* hunspell_dictionary : hunspell_dictionaries_) {
+ for (const auto& hunspell_dictionary : hunspell_dictionaries_) {
bdict_languages.push_back(SpellCheckBDictLanguage());
bdict_languages.back().language = hunspell_dictionary->GetLanguage();
bdict_languages.back().file =
@@ -228,17 +228,18 @@ void SpellcheckService::LoadHunspellDictionaries() {
for (const auto& dictionary_value : *dictionary_values) {
std::string dictionary;
dictionary_value->GetAsString(&dictionary);
- hunspell_dictionaries_.push_back(new SpellcheckHunspellDictionary(
- dictionary,
- content::BrowserContext::GetDefaultStoragePartition(context_)->
- GetURLRequestContext(),
- this));
+ hunspell_dictionaries_.push_back(
+ base::MakeUnique<SpellcheckHunspellDictionary>(
+ dictionary,
+ content::BrowserContext::GetDefaultStoragePartition(context_)
+ ->GetURLRequestContext(),
+ this));
hunspell_dictionaries_.back()->AddObserver(this);
hunspell_dictionaries_.back()->Load();
}
}
-const ScopedVector<SpellcheckHunspellDictionary>&
+const std::vector<std::unique_ptr<SpellcheckHunspellDictionary>>&
SpellcheckService::GetHunspellDictionaries() {
return hunspell_dictionaries_;
}
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_service.h ('k') | chrome/browser/ui/webui/options/language_options_handler_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698