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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_syncer.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/input_method/input_method_syncer.h" 5 #include "chrome/browser/chromeos/input_method/input_method_syncer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 std::vector<std::string> old_tokens = 251 std::vector<std::string> old_tokens =
252 base::SplitString(pref, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 252 base::SplitString(pref, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
253 std::vector<std::string> new_tokens = base::SplitString( 253 std::vector<std::string> new_tokens = base::SplitString(
254 synced_pref, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 254 synced_pref, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
255 255
256 // Check and convert the new tokens. 256 // Check and convert the new tokens.
257 if (pref_name == prefs::kLanguagePreloadEngines || 257 if (pref_name == prefs::kLanguagePreloadEngines ||
258 pref_name == prefs::kLanguageEnabledExtensionImes) { 258 pref_name == prefs::kLanguageEnabledExtensionImes) {
259 input_method::InputMethodManager* manager = 259 input_method::InputMethodManager* manager =
260 input_method::InputMethodManager::Get(); 260 input_method::InputMethodManager::Get();
261 scoped_ptr<input_method::InputMethodDescriptors> supported_descriptors; 261 std::unique_ptr<input_method::InputMethodDescriptors> supported_descriptors;
262 262
263 if (pref_name == prefs::kLanguagePreloadEngines) { 263 if (pref_name == prefs::kLanguagePreloadEngines) {
264 // Set the known input methods. 264 // Set the known input methods.
265 supported_descriptors = manager->GetSupportedInputMethods(); 265 supported_descriptors = manager->GetSupportedInputMethods();
266 // Add the available component extension IMEs. 266 // Add the available component extension IMEs.
267 ComponentExtensionIMEManager* component_extension_manager = 267 ComponentExtensionIMEManager* component_extension_manager =
268 manager->GetComponentExtensionIMEManager(); 268 manager->GetComponentExtensionIMEManager();
269 input_method::InputMethodDescriptors component_descriptors = 269 input_method::InputMethodDescriptors component_descriptors =
270 component_extension_manager->GetAllIMEAsInputMethodDescriptor(); 270 component_extension_manager->GetAllIMEAsInputMethodDescriptor();
271 supported_descriptors->insert(supported_descriptors->end(), 271 supported_descriptors->insert(supported_descriptors->end(),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 void InputMethodSyncer::OnIsSyncingChanged() { 323 void InputMethodSyncer::OnIsSyncingChanged() {
324 if (prefs_->GetBoolean(prefs::kLanguageShouldMergeInputMethods) && 324 if (prefs_->GetBoolean(prefs::kLanguageShouldMergeInputMethods) &&
325 prefs_->IsSyncing()) { 325 prefs_->IsSyncing()) {
326 MergeSyncedPrefs(); 326 MergeSyncedPrefs();
327 } 327 }
328 } 328 }
329 329
330 } // namespace input_method 330 } // namespace input_method
331 } // namespace chromeos 331 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698