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

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: stevenjb@ comments. 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') | chromeos/components/tether/initializer.h » ('J')
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 68980b751c0277c7786b41141bbc1412dfd3c77f..0e10a132aa9e77f928f1d28a210669088632458f 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -57,6 +57,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"
@@ -73,6 +74,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"
@@ -91,6 +93,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"
@@ -1254,8 +1258,14 @@ 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>();
+ chromeos::tether::Initializer::Start(
+ ChromeCryptAuthServiceFactory::GetForBrowserContext(profile),
+ std::move(notification_presenter), profile->GetPrefs(),
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
+ NetworkHandler::Get()->network_state_handler(),
+ NetworkConnect::Get());
}
}
@@ -1948,6 +1958,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') | chromeos/components/tether/initializer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698