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

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

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "chrome/browser/chromeos/base/locale_util.h" 16 #include "chrome/browser/chromeos/base/locale_util.h"
17 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" 17 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h"
18 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" 18 #include "chrome/browser/chromeos/login/signin/token_handle_util.h"
19 #include "chromeos/dbus/session_manager_client.h" 19 #include "chromeos/dbus/session_manager_client.h"
20 #include "chromeos/login/auth/authenticator.h" 20 #include "chromeos/login/auth/authenticator.h"
21 #include "chromeos/login/auth/user_context.h" 21 #include "chromeos/login/auth/user_context.h"
22 #include "components/user_manager/user.h" 22 #include "components/user_manager/user.h"
23 #include "components/user_manager/user_manager.h" 23 #include "components/user_manager/user_manager.h"
24 #include "net/base/network_change_notifier.h" 24 #include "net/base/network_change_notifier.h"
25 #include "ui/base/ime/chromeos/input_method_manager.h" 25 #include "ui/base/ime/chromeos/input_method_manager.h"
26 26
27 class AccountId;
27 class GURL; 28 class GURL;
28 class PrefRegistrySimple; 29 class PrefRegistrySimple;
29 class PrefService; 30 class PrefService;
30 class Profile; 31 class Profile;
31 class TokenHandleFetcher; 32 class TokenHandleFetcher;
32 33
33 namespace net { 34 namespace net {
34 class URLRequestContextGetter; 35 class URLRequestContextGetter;
35 } 36 }
36 37
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // Initializes basic preferences for newly created profile. Any other 294 // Initializes basic preferences for newly created profile. Any other
294 // early profile initialization that needs to happen before 295 // early profile initialization that needs to happen before
295 // ProfileManager::DoFinalInit() gets called is done here. 296 // ProfileManager::DoFinalInit() gets called is done here.
296 void InitProfilePreferences(Profile* profile, 297 void InitProfilePreferences(Profile* profile,
297 const UserContext& user_context); 298 const UserContext& user_context);
298 299
299 // Callback for Profile::CREATE_STATUS_INITIALIZED profile state. 300 // Callback for Profile::CREATE_STATUS_INITIALIZED profile state.
300 // Profile is created, extensions and promo resources are initialized. 301 // Profile is created, extensions and promo resources are initialized.
301 void UserProfileInitialized(Profile* profile, 302 void UserProfileInitialized(Profile* profile,
302 bool is_incognito_profile, 303 bool is_incognito_profile,
303 const std::string& user_id); 304 const AccountId& account_id);
304 305
305 // Callback to resume profile creation after transferring auth data from 306 // Callback to resume profile creation after transferring auth data from
306 // the authentication profile. 307 // the authentication profile.
307 void CompleteProfileCreateAfterAuthTransfer(Profile* profile); 308 void CompleteProfileCreateAfterAuthTransfer(Profile* profile);
308 309
309 // Finalized profile preparation. 310 // Finalized profile preparation.
310 void FinalizePrepareProfile(Profile* profile); 311 void FinalizePrepareProfile(Profile* profile);
311 312
312 // Starts out-of-box flow with the specified screen. 313 // Starts out-of-box flow with the specified screen.
313 void ActivateWizard(const std::string& screen_name); 314 void ActivateWizard(const std::string& screen_name);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 void DoBrowserLaunchInternal(Profile* profile, 362 void DoBrowserLaunchInternal(Profile* profile,
362 LoginDisplayHost* login_host, 363 LoginDisplayHost* login_host,
363 bool locale_pref_checked); 364 bool locale_pref_checked);
364 365
365 static void RunCallbackOnLocaleLoaded( 366 static void RunCallbackOnLocaleLoaded(
366 const base::Closure& callback, 367 const base::Closure& callback,
367 InputEventsBlocker* input_events_blocker, 368 InputEventsBlocker* input_events_blocker,
368 const locale_util::LanguageSwitchResult& result); 369 const locale_util::LanguageSwitchResult& result);
369 370
370 // Callback invoked when |token_handle_util_| has finished. 371 // Callback invoked when |token_handle_util_| has finished.
371 void OnTokenHandleObtained(const user_manager::UserID& id, bool success); 372 void OnTokenHandleObtained(const AccountId& account_id, bool success);
372 373
373 // Returns |true| if token handles should be used on this device. 374 // Returns |true| if token handles should be used on this device.
374 bool TokenHandlesEnabled(); 375 bool TokenHandlesEnabled();
375 376
376 void CreateTokenUtilIfMissing(); 377 void CreateTokenUtilIfMissing();
377 378
378 // Test API methods. 379 // Test API methods.
379 380
380 // Injects |user_context| that will be used to create StubAuthenticator 381 // Injects |user_context| that will be used to create StubAuthenticator
381 // instance when CreateAuthenticator() is called. 382 // instance when CreateAuthenticator() is called.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 bool waiting_for_child_account_status_; 477 bool waiting_for_child_account_status_;
477 478
478 base::WeakPtrFactory<UserSessionManager> weak_factory_; 479 base::WeakPtrFactory<UserSessionManager> weak_factory_;
479 480
480 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); 481 DISALLOW_COPY_AND_ASSIGN(UserSessionManager);
481 }; 482 };
482 483
483 } // namespace chromeos 484 } // namespace chromeos
484 485
485 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 486 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698