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

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

Issue 8773046: [cros] Display emails of users are stored in a separate dictionary in Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Thin wrapper around BrowserInit::LaunchBrowser(). Meant to be used in a 45 // Thin wrapper around BrowserInit::LaunchBrowser(). Meant to be used in a
46 // Task posted to the UI thread. Once the browser is launched the login 46 // Task posted to the UI thread. Once the browser is launched the login
47 // host is deleted. 47 // host is deleted.
48 static void DoBrowserLaunch(Profile* profile, 48 static void DoBrowserLaunch(Profile* profile,
49 LoginDisplayHost* login_host); 49 LoginDisplayHost* login_host);
50 50
51 virtual ~LoginUtils() {} 51 virtual ~LoginUtils() {}
52 52
53 // Loads and prepares profile for the session. Fires |delegate| in the end. 53 // Loads and prepares profile for the session. Fires |delegate| in the end.
54 // If |pending_requests| is true, there's a pending online auth request. 54 // If |pending_requests| is true, there's a pending online auth request.
55 // If |display_email| is not empty, user's displayed email will be set to
56 // this value, shown in UI and used for Sync.
Nikita (slow) 2011/12/05 13:13:04 nit: used for Sync > displayed in Sync status? As
55 // Also see DelegateDeleted method. 57 // Also see DelegateDeleted method.
56 virtual void PrepareProfile( 58 virtual void PrepareProfile(
57 const std::string& username, 59 const std::string& username,
60 const std::string& display_email,
58 const std::string& password, 61 const std::string& password,
59 const GaiaAuthConsumer::ClientLoginResult& credentials, 62 const GaiaAuthConsumer::ClientLoginResult& credentials,
60 bool pending_requests, 63 bool pending_requests,
61 bool using_oauth, 64 bool using_oauth,
62 bool has_cookies, 65 bool has_cookies,
63 Delegate* delegate) = 0; 66 Delegate* delegate) = 0;
64 67
65 // Invalidates |delegate|, which was passed to PrepareProfile method call. 68 // Invalidates |delegate|, which was passed to PrepareProfile method call.
66 virtual void DelegateDeleted(Delegate* delegate) = 0; 69 virtual void DelegateDeleted(Delegate* delegate) = 0;
67 70
(...skipping 15 matching lines...) Expand all
83 // holds reference to login profile and is later used during fetching of 86 // holds reference to login profile and is later used during fetching of
84 // OAuth tokens. 87 // OAuth tokens.
85 // TODO(nkostylev): Cleanup after WebUI login migration is complete. 88 // TODO(nkostylev): Cleanup after WebUI login migration is complete.
86 virtual scoped_refptr<Authenticator> CreateAuthenticator( 89 virtual scoped_refptr<Authenticator> CreateAuthenticator(
87 LoginStatusConsumer* consumer) = 0; 90 LoginStatusConsumer* consumer) = 0;
88 91
89 // Prewarms the authentication network connection. 92 // Prewarms the authentication network connection.
90 virtual void PrewarmAuthentication() = 0; 93 virtual void PrewarmAuthentication() = 0;
91 94
92 // Restores authentication session after crash. 95 // Restores authentication session after crash.
93 virtual void RestoreAuthenticationSession(const std::string& user_name, 96 virtual void RestoreAuthenticationSession(Profile* profile) = 0;
94 Profile* profile) = 0;
95 97
96 // Starts process of fetching OAuth2 tokens (based on OAuth1 tokens found 98 // Starts process of fetching OAuth2 tokens (based on OAuth1 tokens found
97 // in |user_profile|) and kicks off internal services that depend on them. 99 // in |user_profile|) and kicks off internal services that depend on them.
98 virtual void StartTokenServices(Profile* user_profile) = 0; 100 virtual void StartTokenServices(Profile* user_profile) = 0;
99 101
100 // Supply credentials for sync and others to use. 102 // Supply credentials for sync and others to use.
101 virtual void StartSync( 103 virtual void StartSync(
102 Profile* profile, 104 Profile* profile,
103 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0; 105 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0;
104 106
(...skipping 24 matching lines...) Expand all
129 // given command line. 131 // given command line.
130 virtual std::string GetOffTheRecordCommandLine( 132 virtual std::string GetOffTheRecordCommandLine(
131 const GURL& start_url, 133 const GURL& start_url,
132 const CommandLine& base_command_line, 134 const CommandLine& base_command_line,
133 CommandLine* command_line) = 0; 135 CommandLine* command_line) = 0;
134 }; 136 };
135 137
136 } // namespace chromeos 138 } // namespace chromeos
137 139
138 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ 140 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698