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

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

Issue 1055863002: ChromeOS: switch UI language before apps are loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove empty line. Created 5 years, 7 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // login host is deleted. 184 // login host is deleted.
185 void DoBrowserLaunch(Profile* profile, LoginDisplayHost* login_host); 185 void DoBrowserLaunch(Profile* profile, LoginDisplayHost* login_host);
186 186
187 // Changes browser locale (selects best suitable locale from different 187 // Changes browser locale (selects best suitable locale from different
188 // user settings). Returns true if callback will be called. 188 // user settings). Returns true if callback will be called.
189 bool RespectLocalePreference( 189 bool RespectLocalePreference(
190 Profile* profile, 190 Profile* profile,
191 const user_manager::User* user, 191 const user_manager::User* user,
192 const locale_util::SwitchLanguageCallback& callback) const; 192 const locale_util::SwitchLanguageCallback& callback) const;
193 193
194 // Switch to the locale that |profile| wishes to use and invoke |callback|.
195 void RespectLocalePreferenceWrapper(Profile* profile,
196 const base::Closure& callback);
197
194 // Restarts Chrome if needed. This happens when user session has custom 198 // Restarts Chrome if needed. This happens when user session has custom
195 // flags/switches enabled. Another case when owner has setup custom flags, 199 // flags/switches enabled. Another case when owner has setup custom flags,
196 // they are applied on login screen as well but not to user session. 200 // they are applied on login screen as well but not to user session.
197 // |early_restart| is true if this restart attempt happens before user profile 201 // |early_restart| is true if this restart attempt happens before user profile
198 // is fully initialized. 202 // is fully initialized.
199 // Might not return if restart is possible right now. 203 // Might not return if restart is possible right now.
200 // Returns true if restart was scheduled. 204 // Returns true if restart was scheduled.
201 // Returns false if no restart is needed. 205 // Returns false if no restart is needed.
202 bool RestartToApplyPerSessionFlagsIfNeed(Profile* profile, 206 bool RestartToApplyPerSessionFlagsIfNeed(Profile* profile,
203 bool early_restart); 207 bool early_restart);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 bool success); 348 bool success);
345 349
346 // Internal implementation of DoBrowserLaunch. Initially should be called with 350 // Internal implementation of DoBrowserLaunch. Initially should be called with
347 // |locale_pref_checked| set to false which will result in postponing browser 351 // |locale_pref_checked| set to false which will result in postponing browser
348 // launch till user locale is applied if needed. After locale check has 352 // launch till user locale is applied if needed. After locale check has
349 // completed this method is called with |locale_pref_checked| set to true. 353 // completed this method is called with |locale_pref_checked| set to true.
350 void DoBrowserLaunchInternal(Profile* profile, 354 void DoBrowserLaunchInternal(Profile* profile,
351 LoginDisplayHost* login_host, 355 LoginDisplayHost* login_host,
352 bool locale_pref_checked); 356 bool locale_pref_checked);
353 357
354 // Switch to the locale that |profile| wishes to use and invoke |callback|.
355 void RespectLocalePreferenceWrapper(Profile* profile,
356 const base::Closure& callback);
357
358 static void RunCallbackOnLocaleLoaded( 358 static void RunCallbackOnLocaleLoaded(
359 const base::Closure& callback, 359 const base::Closure& callback,
360 InputEventsBlocker* input_events_blocker, 360 InputEventsBlocker* input_events_blocker,
361 const locale_util::LanguageSwitchResult& result); 361 const locale_util::LanguageSwitchResult& result);
362 362
363 // Test API methods. 363 // Test API methods.
364 364
365 // Injects |user_context| that will be used to create StubAuthenticator 365 // Injects |user_context| that will be used to create StubAuthenticator
366 // instance when CreateAuthenticator() is called. 366 // instance when CreateAuthenticator() is called.
367 void InjectStubUserContext(const UserContext& user_context); 367 void InjectStubUserContext(const UserContext& user_context);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 bool waiting_for_child_account_status_; 451 bool waiting_for_child_account_status_;
452 452
453 base::WeakPtrFactory<UserSessionManager> weak_factory_; 453 base::WeakPtrFactory<UserSessionManager> weak_factory_;
454 454
455 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); 455 DISALLOW_COPY_AND_ASSIGN(UserSessionManager);
456 }; 456 };
457 457
458 } // namespace chromeos 458 } // namespace chromeos
459 459
460 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 460 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/network_screen.cc ('k') | chrome/browser/chromeos/login/session/user_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698