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

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

Issue 11649055: OAuth2 sign-in flow for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 7 years, 11 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 (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/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "google_apis/gaia/gaia_auth_consumer.h"
12 11
13 class CommandLine; 12 class CommandLine;
14 class GURL; 13 class GURL;
15 class Profile; 14 class Profile;
16 class PrefService; 15 class PrefService;
17 16
18 namespace { 17 namespace {
19 class BrowserGuestSessionNavigatorTest; 18 class BrowserGuestSessionNavigatorTest;
20 } // namespace 19 } // namespace
21 20
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 58
60 // Loads and prepares profile for the session. Fires |delegate| in the end. 59 // Loads and prepares profile for the session. Fires |delegate| in the end.
61 // If |pending_requests| is true, there's a pending online auth request. 60 // If |pending_requests| is true, there's a pending online auth request.
62 // If |display_email| is not empty, user's displayed email will be set to 61 // If |display_email| is not empty, user's displayed email will be set to
63 // this value, shown in UI. 62 // this value, shown in UI.
64 // Also see DelegateDeleted method. 63 // Also see DelegateDeleted method.
65 virtual void PrepareProfile( 64 virtual void PrepareProfile(
66 const std::string& username, 65 const std::string& username,
67 const std::string& display_email, 66 const std::string& display_email,
68 const std::string& password, 67 const std::string& password,
69 bool pending_requests,
70 bool using_oauth, 68 bool using_oauth,
71 bool has_cookies, 69 bool has_cookies,
72 Delegate* delegate) = 0; 70 Delegate* delegate) = 0;
73 71
74 // Invalidates |delegate|, which was passed to PrepareProfile method call. 72 // Invalidates |delegate|, which was passed to PrepareProfile method call.
75 virtual void DelegateDeleted(Delegate* delegate) = 0; 73 virtual void DelegateDeleted(Delegate* delegate) = 0;
76 74
77 // Invoked after the tmpfs is successfully mounted. 75 // Invoked after the tmpfs is successfully mounted.
78 // Asks session manager to restart Chrome in Browse Without Sign In mode. 76 // Asks session manager to restart Chrome in Browse Without Sign In mode.
79 // |start_url| is url for launched browser to open. 77 // |start_url| is url for launched browser to open.
(...skipping 14 matching lines...) Expand all
94 // TODO(nkostylev): Cleanup after WebUI login migration is complete. 92 // TODO(nkostylev): Cleanup after WebUI login migration is complete.
95 virtual scoped_refptr<Authenticator> CreateAuthenticator( 93 virtual scoped_refptr<Authenticator> CreateAuthenticator(
96 LoginStatusConsumer* consumer) = 0; 94 LoginStatusConsumer* consumer) = 0;
97 95
98 // Prewarms the authentication network connection. 96 // Prewarms the authentication network connection.
99 virtual void PrewarmAuthentication() = 0; 97 virtual void PrewarmAuthentication() = 0;
100 98
101 // Restores authentication session after crash. 99 // Restores authentication session after crash.
102 virtual void RestoreAuthenticationSession(Profile* profile) = 0; 100 virtual void RestoreAuthenticationSession(Profile* profile) = 0;
103 101
104 // Starts process of fetching OAuth2 tokens (based on OAuth1 tokens found
105 // in |user_profile|) and kicks off internal services that depend on them.
106 virtual void StartTokenServices(Profile* user_profile) = 0;
107
108 // Supply credentials for sync and others to use.
109 virtual void StartSignedInServices(
110 Profile* profile,
111 const GaiaAuthConsumer::ClientLoginResult& credentials) = 0;
112
113 // Stops background fetchers. 102 // Stops background fetchers.
114 virtual void StopBackgroundFetchers() = 0; 103 virtual void StopBackgroundFetchers() = 0;
115 104
116 // Initialize RLZ. 105 // Initialize RLZ.
117 virtual void InitRlzDelayed(Profile* user_profile) = 0; 106 virtual void InitRlzDelayed(Profile* user_profile) = 0;
118 107
119 protected: 108 protected:
120 friend class ::BrowserGuestSessionNavigatorTest; 109 friend class ::BrowserGuestSessionNavigatorTest;
121 110
122 // Returns command line string to be used for the OTR process. Also modifies 111 // Returns command line string to be used for the OTR process. Also modifies
123 // given command line. 112 // given command line.
124 virtual std::string GetOffTheRecordCommandLine( 113 virtual std::string GetOffTheRecordCommandLine(
125 const GURL& start_url, 114 const GURL& start_url,
126 const CommandLine& base_command_line, 115 const CommandLine& base_command_line,
127 CommandLine* command_line) = 0; 116 CommandLine* command_line) = 0;
128 }; 117 };
129 118
130 } // namespace chromeos 119 } // namespace chromeos
131 120
132 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ 121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698