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

Unified Diff: chrome/browser/chromeos/preferences.cc

Issue 756363003: Revert of Sync starting language and input method preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | chrome/browser/chromeos/preferences_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/preferences.cc
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index 6ab83e2f9f6e41b19920cf30e8dc5a7434cfd1d1..365d53e88c22d5d8d31f9adf1e177aae833b5358 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -22,9 +22,10 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/chromeos/drive/file_system_util.h"
-#include "chrome/browser/chromeos/input_method/input_method_syncer.h"
+#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/chromeos/login/session/user_session_manager.h"
#include "chrome/browser/chromeos/net/wake_on_wifi_manager.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/system/input_device_settings.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
@@ -35,7 +36,6 @@
#include "components/feedback/tracing_manager.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/user_manager/user.h"
-#include "content/public/browser/browser_thread.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
#include "ui/base/ime/chromeos/extension_ime_util.h"
#include "ui/base/ime/chromeos/ime_keyboard.h"
@@ -216,6 +216,9 @@
prefs::kLanguagePreviousInputMethod,
"",
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ // We don't sync the list of input methods and preferred languages since a
+ // user might use two or more devices with different hardware keyboards.
+ // crosbug.com/15181
registry->RegisterStringPref(
prefs::kLanguagePreferredLanguages,
kFallbackInputMethodLocale,
@@ -319,8 +322,6 @@
prefs::kTouchVirtualKeyboardEnabled,
false,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
-
- input_method::InputMethodSyncer::RegisterProfilePrefs(registry);
}
void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) {
@@ -366,9 +367,6 @@
DCHECK(profile);
DCHECK(user);
PrefServiceSyncable* prefs = PrefServiceSyncable::FromProfile(profile);
- // This causes OnIsSyncingChanged to be called when the value of
- // PrefService::IsSyncing() changes.
- prefs->AddObserver(this);
user_ = user;
user_is_primary_ =
user_manager::UserManager::Get()->GetPrimaryUser() == user_;
@@ -376,6 +374,10 @@
user_manager::UserManager::Get()->AddSessionStateObserver(this);
+ // This causes OnIsSyncingChanged to be called when the value of
+ // PrefService::IsSyncing() changes.
+ prefs->AddObserver(this);
+
UserSessionManager* session_manager = UserSessionManager::GetInstance();
DCHECK(session_manager);
ime_state_ = session_manager->GetDefaultIMEState(profile);
@@ -383,9 +385,6 @@
// Initialize preferences to currently saved state.
ApplyPreferences(REASON_INITIALIZATION, "");
- input_method_syncer_.reset(
- new input_method::InputMethodSyncer(prefs, ime_state_));
- input_method_syncer_->Initialize();
// If a guest is logged in, initialize the prefs as if this is the first
// login. For a regular user this is done in
@@ -405,10 +404,6 @@
input_method_manager_->SetState(ime_state);
InitUserPrefs(prefs);
-
- input_method_syncer_.reset(
- new input_method::InputMethodSyncer(prefs, ime_state_));
- input_method_syncer_->Initialize();
}
void Preferences::SetInputMethodListForTesting() {
@@ -550,9 +545,7 @@
#if !defined(USE_ATHENA)
if (user_is_active) {
const bool enabled = touch_hud_projection_enabled_.GetValue();
- // There may not be a shell, e.g., in some unit tests.
- if (ash::Shell::HasInstance())
- ash::Shell::GetInstance()->SetTouchHudProjectionEnabled(enabled);
+ ash::Shell::GetInstance()->SetTouchHudProjectionEnabled(enabled);
}
#endif
}
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | chrome/browser/chromeos/preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698