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

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

Issue 2060623002: Implementation of Device End of Life Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hook EolNotification in UserSessionManager::FinalizePrepareProfile Created 4 years, 6 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/macros.h" 12 #include "base/macros.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/eol_notification.h"
17 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" 18 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h"
18 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" 19 #include "chrome/browser/chromeos/login/signin/token_handle_util.h"
19 #include "chromeos/dbus/session_manager_client.h" 20 #include "chromeos/dbus/session_manager_client.h"
20 #include "chromeos/login/auth/authenticator.h" 21 #include "chromeos/login/auth/authenticator.h"
21 #include "chromeos/login/auth/user_context.h" 22 #include "chromeos/login/auth/user_context.h"
22 #include "components/user_manager/user.h" 23 #include "components/user_manager/user.h"
23 #include "components/user_manager/user_manager.h" 24 #include "components/user_manager/user_manager.h"
24 #include "net/base/network_change_notifier.h" 25 #include "net/base/network_change_notifier.h"
25 #include "ui/base/ime/chromeos/input_method_manager.h" 26 #include "ui/base/ime/chromeos/input_method_manager.h"
26 27
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 const locale_util::LanguageSwitchResult& result); 371 const locale_util::LanguageSwitchResult& result);
371 372
372 // Callback invoked when |token_handle_util_| has finished. 373 // Callback invoked when |token_handle_util_| has finished.
373 void OnTokenHandleObtained(const AccountId& account_id, bool success); 374 void OnTokenHandleObtained(const AccountId& account_id, bool success);
374 375
375 // Returns |true| if token handles should be used on this device. 376 // Returns |true| if token handles should be used on this device.
376 bool TokenHandlesEnabled(); 377 bool TokenHandlesEnabled();
377 378
378 void CreateTokenUtilIfMissing(); 379 void CreateTokenUtilIfMissing();
379 380
381 // Returns |true| if given profile show see EndofLife Notification when
382 // applicable.
383 bool ShouldShowEolNotification(Profile* profile);
384
380 // Test API methods. 385 // Test API methods.
381 386
382 // Injects |user_context| that will be used to create StubAuthenticator 387 // Injects |user_context| that will be used to create StubAuthenticator
383 // instance when CreateAuthenticator() is called. 388 // instance when CreateAuthenticator() is called.
384 void InjectStubUserContext(const UserContext& user_context); 389 void InjectStubUserContext(const UserContext& user_context);
385 390
386 // Controls whether browser instance should be launched after sign in 391 // Controls whether browser instance should be launched after sign in
387 // (used in tests). 392 // (used in tests).
388 void set_should_launch_browser_in_tests(bool should_launch_browser) { 393 void set_should_launch_browser_in_tests(bool should_launch_browser) {
389 should_launch_browser_ = should_launch_browser; 394 should_launch_browser_ = should_launch_browser;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 460
456 // Kiosk mode related members. 461 // Kiosk mode related members.
457 // Chrome oauth client id and secret - override values for kiosk mode. 462 // Chrome oauth client id and secret - override values for kiosk mode.
458 std::string chrome_client_id_; 463 std::string chrome_client_id_;
459 std::string chrome_client_secret_; 464 std::string chrome_client_secret_;
460 465
461 // Per-user-session Input Methods states. 466 // Per-user-session Input Methods states.
462 std::map<Profile*, scoped_refptr<input_method::InputMethodManager::State>, 467 std::map<Profile*, scoped_refptr<input_method::InputMethodManager::State>,
463 ProfileCompare> default_ime_states_; 468 ProfileCompare> default_ime_states_;
464 469
470 // Used to Add/Update Eol notification
471 std::unique_ptr<EolNotification> eol_notification_;
472
465 // Manages Easy unlock cryptohome keys. 473 // Manages Easy unlock cryptohome keys.
466 std::unique_ptr<EasyUnlockKeyManager> easy_unlock_key_manager_; 474 std::unique_ptr<EasyUnlockKeyManager> easy_unlock_key_manager_;
467 bool running_easy_unlock_key_ops_; 475 bool running_easy_unlock_key_ops_;
468 base::Closure easy_unlock_key_ops_finished_callback_; 476 base::Closure easy_unlock_key_ops_finished_callback_;
469 477
470 // Whether should fetch token handles, tests may override this value. 478 // Whether should fetch token handles, tests may override this value.
471 bool should_obtain_handles_; 479 bool should_obtain_handles_;
472 480
473 std::unique_ptr<TokenHandleUtil> token_handle_util_; 481 std::unique_ptr<TokenHandleUtil> token_handle_util_;
474 std::unique_ptr<TokenHandleFetcher> token_handle_fetcher_; 482 std::unique_ptr<TokenHandleFetcher> token_handle_fetcher_;
475 483
476 // Whether should launch browser, tests may override this value. 484 // Whether should launch browser, tests may override this value.
477 bool should_launch_browser_; 485 bool should_launch_browser_;
478 486
479 // Child account status is necessary for InitializeStartUrls call. 487 // Child account status is necessary for InitializeStartUrls call.
480 bool waiting_for_child_account_status_; 488 bool waiting_for_child_account_status_;
481 489
482 base::WeakPtrFactory<UserSessionManager> weak_factory_; 490 base::WeakPtrFactory<UserSessionManager> weak_factory_;
483 491
484 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); 492 DISALLOW_COPY_AND_ASSIGN(UserSessionManager);
485 }; 493 };
486 494
487 } // namespace chromeos 495 } // namespace chromeos
488 496
489 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ 497 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698