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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.h

Issue 641123002: Cleanup LoginUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: return flags method Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LOGIN_UTILS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Set LoginUtils singleton object for test purpose only! 47 // Set LoginUtils singleton object for test purpose only!
48 static void Set(LoginUtils* ptr); 48 static void Set(LoginUtils* ptr);
49 49
50 // Checks if the given username is whitelisted and allowed to sign-in to 50 // Checks if the given username is whitelisted and allowed to sign-in to
51 // this device. |wildcard_match| may be NULL. If it's present, it'll be set to 51 // this device. |wildcard_match| may be NULL. If it's present, it'll be set to
52 // true if the whitelist check was satisfied via a wildcard. 52 // true if the whitelist check was satisfied via a wildcard.
53 static bool IsWhitelisted(const std::string& username, bool* wildcard_match); 53 static bool IsWhitelisted(const std::string& username, bool* wildcard_match);
54 54
55 virtual ~LoginUtils() {} 55 virtual ~LoginUtils() {}
56 56
57 // Switch to the locale that |profile| wishes to use and invoke |callback|.
58 virtual void RespectLocalePreference(Profile* profile,
59 const base::Closure& callback) = 0;
60
61 // Thin wrapper around StartupBrowserCreator::LaunchBrowser(). Meant to be 57 // Thin wrapper around StartupBrowserCreator::LaunchBrowser(). Meant to be
62 // used in a Task posted to the UI thread. Once the browser is launched the 58 // used in a Task posted to the UI thread. Once the browser is launched the
63 // login host is deleted. 59 // login host is deleted.
64 virtual void DoBrowserLaunch(Profile* profile, 60 virtual void DoBrowserLaunch(Profile* profile,
65 LoginDisplayHost* login_host) = 0; 61 LoginDisplayHost* login_host) = 0;
66 62
67 // Loads and prepares profile for the session. Fires |delegate| in the end. 63 // Loads and prepares profile for the session. Fires |delegate| in the end.
68 // |user_context.username_hash| defines when user homedir is mounted. 64 // |user_context.username_hash| defines when user homedir is mounted.
69 // Also see DelegateDeleted method. 65 // Also see DelegateDeleted method.
70 // If |has_active_session| is true than this is a case of restoring user 66 // If |has_active_session| is true than this is a case of restoring user
(...skipping 30 matching lines...) Expand all
101 // Might not return if restart is possible right now. 97 // Might not return if restart is possible right now.
102 // Returns true if restart was scheduled. 98 // Returns true if restart was scheduled.
103 // Returns false if no restart is needed, 99 // Returns false if no restart is needed,
104 virtual bool RestartToApplyPerSessionFlagsIfNeed(Profile* profile, 100 virtual bool RestartToApplyPerSessionFlagsIfNeed(Profile* profile,
105 bool early_restart) = 0; 101 bool early_restart) = 0;
106 }; 102 };
107 103
108 } // namespace chromeos 104 } // namespace chromeos
109 105
110 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ 106 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698