| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/preferences.h" | 5 #include "chrome/browser/chromeos/preferences.h" |
| 6 | 6 |
| 7 #include "base/string_split.h" | 7 #include "base/string_split.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 SetImeConfig(section, name, config); | 400 SetImeConfig(section, name, config); |
| 401 } | 401 } |
| 402 | 402 |
| 403 void Preferences::SetLanguageConfigStringListAsCSV(const char* section, | 403 void Preferences::SetLanguageConfigStringListAsCSV(const char* section, |
| 404 const char* name, | 404 const char* name, |
| 405 const std::string& value) { | 405 const std::string& value) { |
| 406 LOG(INFO) << "Setting " << name << " to '" << value << "'"; | 406 LOG(INFO) << "Setting " << name << " to '" << value << "'"; |
| 407 | 407 |
| 408 std::vector<std::string> split_values; | 408 std::vector<std::string> split_values; |
| 409 if (!value.empty()) | 409 if (!value.empty()) |
| 410 SplitString(value, ',', &split_values); | 410 base::SplitString(value, ',', &split_values); |
| 411 | 411 |
| 412 // We should call the cros API even when |value| is empty, to disable default | 412 // We should call the cros API even when |value| is empty, to disable default |
| 413 // config. | 413 // config. |
| 414 SetLanguageConfigStringList(section, name, split_values); | 414 SetLanguageConfigStringList(section, name, split_values); |
| 415 } | 415 } |
| 416 | 416 |
| 417 void Preferences::UpdateModifierKeyMapping() { | 417 void Preferences::UpdateModifierKeyMapping() { |
| 418 const int search_remap = language_xkb_remap_search_key_to_.GetValue(); | 418 const int search_remap = language_xkb_remap_search_key_to_.GetValue(); |
| 419 const int control_remap = language_xkb_remap_control_key_to_.GetValue(); | 419 const int control_remap = language_xkb_remap_control_key_to_.GetValue(); |
| 420 const int alt_remap = language_xkb_remap_alt_key_to_.GetValue(); | 420 const int alt_remap = language_xkb_remap_alt_key_to_.GetValue(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 } | 452 } |
| 453 | 453 |
| 454 if (labs_talk_enabled_.GetValue() == 0) { | 454 if (labs_talk_enabled_.GetValue() == 0) { |
| 455 profile_->GetExtensionsService()->DisableExtension(kTalkAppExtensionId); | 455 profile_->GetExtensionsService()->DisableExtension(kTalkAppExtensionId); |
| 456 } else { | 456 } else { |
| 457 profile_->GetExtensionsService()->EnableExtension(kTalkAppExtensionId); | 457 profile_->GetExtensionsService()->EnableExtension(kTalkAppExtensionId); |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 | 460 |
| 461 } // namespace chromeos | 461 } // namespace chromeos |
| OLD | NEW |