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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 312023002: Sync starting language and input method preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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/login/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Skip if it's already in language_codes. 96 // Skip if it's already in language_codes.
97 if (std::count(language_codes.begin(), language_codes.end(), 97 if (std::count(language_codes.begin(), language_codes.end(),
98 candidate) == 0) { 98 candidate) == 0) {
99 language_codes.push_back(candidate); 99 language_codes.push_back(candidate);
100 } 100 }
101 } 101 }
102 102
103 // Save the preferred languages in the user's preferences. 103 // Save the preferred languages in the user's preferences.
104 StringPrefMember language_preferred_languages; 104 StringPrefMember language_preferred_languages;
105 language_preferred_languages.Init(prefs::kLanguagePreferredLanguages, prefs); 105 language_preferred_languages.Init(prefs::kLanguagePreferredLanguages, prefs);
106 language_preferred_languages.SetValue(JoinString(language_codes, ',')); 106 language_preferred_languages.SetValue(JoinString(language_codes, ','));
dzhioev (left Google) 2014/07/24 20:31:34 Could you please replace these 3 lines with a sing
michaelpg 2014/07/25 23:49:08 Done.
107
108 // Indicate that we need to merge the synced input methods when we sync.
109 prefs->SetBoolean(prefs::kLanguageShouldMergeInputMethods, true);
michaelpg 2014/07/10 00:46:02 This isn't actually new to patch#7. reitveld seems
dzhioev (left Google) 2014/07/23 11:02:20 Are you sure? There are no such lines on ToT.
dzhioev (left Google) 2014/07/23 11:06:50 Sorry, didn't notice that you were talking about p
107 } 110 }
108 111
109 #if defined(ENABLE_RLZ) 112 #if defined(ENABLE_RLZ)
110 // Flag file that disables RLZ tracking, when present. 113 // Flag file that disables RLZ tracking, when present.
111 const base::FilePath::CharType kRLZDisabledFlagName[] = 114 const base::FilePath::CharType kRLZDisabledFlagName[] =
112 FILE_PATH_LITERAL(".rlz_disabled"); 115 FILE_PATH_LITERAL(".rlz_disabled");
113 116
114 base::FilePath GetRlzDisabledFlagPath() { 117 base::FilePath GetRlzDisabledFlagPath() {
115 base::FilePath homedir; 118 base::FilePath homedir;
116 PathService::Get(base::DIR_HOME, &homedir); 119 PathService::Get(base::DIR_HOME, &homedir);
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 primary_user && 754 primary_user &&
752 profile == ProfileHelper::Get()->GetProfileByUser(primary_user) && 755 profile == ProfileHelper::Get()->GetProfileByUser(primary_user) &&
753 CertLoader::IsInitialized() && 756 CertLoader::IsInitialized() &&
754 base::SysInfo::IsRunningOnChromeOS()) { 757 base::SysInfo::IsRunningOnChromeOS()) {
755 GetNSSCertDatabaseForProfile(profile, 758 GetNSSCertDatabaseForProfile(profile,
756 base::Bind(&OnGetNSSCertDatabaseForUser)); 759 base::Bind(&OnGetNSSCertDatabaseForUser));
757 } 760 }
758 } 761 }
759 762
760 } // namespace chromeos 763 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698