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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2801353002: [CrOS Tether] Fill out the Initializer class. Tether will now initialize fully once the flag is ena… (Closed)
Patch Set: Added missing dep. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/components/tether/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 7f3715ce31ed679aca4ea5566a74fb42914f6e85..1d6b4e5ae10ae12a9c719d4a7d3c651f57a38561 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -56,6 +56,7 @@
#include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
+#include "chrome/browser/chromeos/net/tether_notification_presenter.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
@@ -72,6 +73,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/easy_unlock_service.h"
+#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
#include "chrome/browser/supervised_user/child_accounts/child_account_service_factory.h"
@@ -90,6 +92,8 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "chromeos/login/auth/stub_authenticator.h"
+#include "chromeos/network/network_connect.h"
+#include "chromeos/network/network_state_handler.h"
#include "chromeos/network/portal_detector/network_portal_detector.h"
#include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
#include "chromeos/settings/cros_settings_names.h"
@@ -119,6 +123,7 @@
#include "rlz/features/features.h"
#include "ui/base/ime/chromeos/input_method_descriptor.h"
#include "ui/base/ime/chromeos/input_method_manager.h"
+#include "ui/message_center/message_center.h"
#include "url/gurl.h"
#if BUILDFLAG(ENABLE_RLZ)
@@ -1247,8 +1252,15 @@ void UserSessionManager::FinalizePrepareProfile(Profile* profile) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableTether)) {
- chromeos::tether::Initializer::Initialize(
- ChromeCryptAuthServiceFactory::GetForBrowserContext(profile));
+ auto notification_presenter =
+ base::MakeUnique<tether::TetherNotificationPresenter>(
+ message_center::MessageCenter::Get(), NetworkConnect::Get());
+ chromeos::tether::Initializer::Init(
+ ChromeCryptAuthServiceFactory::GetForBrowserContext(profile),
+ std::move(notification_presenter), profile->GetPrefs(),
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
+ NetworkHandler::Get()->network_state_handler(),
+ NetworkConnect::Get());
}
}
@@ -1932,6 +1944,11 @@ bool UserSessionManager::TokenHandlesEnabled() {
}
void UserSessionManager::Shutdown() {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kEnableTether)) {
+ chromeos::tether::Initializer::Shutdown();
+ }
+
token_handle_fetcher_.reset();
token_handle_util_.reset();
first_run::GoodiesDisplayer::Delete();
« no previous file with comments | « no previous file | chromeos/components/tether/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698