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

Side by Side Diff: chrome/browser/chromeos/tether/tether_service.cc

Issue 2821103003: Remove the configuration of Tether-associated Wi-Fi networks once connectivity is lost. (Closed)
Patch Set: Rebase. 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 unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/components/tether/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "chrome/browser/chromeos/tether/tether_service.h" 5 #include "chrome/browser/chromeos/tether/tether_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "chrome/browser/chromeos/net/tether_notification_presenter.h" 10 #include "chrome/browser/chromeos/net/tether_notification_presenter.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 auto notification_presenter = 52 auto notification_presenter =
53 base::MakeUnique<chromeos::tether::TetherNotificationPresenter>( 53 base::MakeUnique<chromeos::tether::TetherNotificationPresenter>(
54 message_center::MessageCenter::Get(), 54 message_center::MessageCenter::Get(),
55 chromeos::NetworkConnect::Get()); 55 chromeos::NetworkConnect::Get());
56 chromeos::tether::Initializer::Init( 56 chromeos::tether::Initializer::Init(
57 ChromeCryptAuthServiceFactory::GetForBrowserContext(profile_), 57 ChromeCryptAuthServiceFactory::GetForBrowserContext(profile_),
58 std::move(notification_presenter), profile_->GetPrefs(), 58 std::move(notification_presenter), profile_->GetPrefs(),
59 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_), 59 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_),
60 chromeos::NetworkHandler::Get()->network_state_handler(), 60 chromeos::NetworkHandler::Get()->network_state_handler(),
61 chromeos::NetworkHandler::Get()->managed_network_configuration_handler(),
61 chromeos::NetworkConnect::Get()); 62 chromeos::NetworkConnect::Get());
62 } 63 }
63 64
64 bool TetherService::IsAllowed() const { 65 bool TetherService::IsAllowed() const {
65 if (shut_down_) 66 if (shut_down_)
66 return false; 67 return false;
67 68
68 return profile_->GetPrefs()->GetBoolean(prefs::kInstantTetheringAllowed); 69 return profile_->GetPrefs()->GetBoolean(prefs::kInstantTetheringAllowed);
69 } 70 }
70 71
(...skipping 12 matching lines...) Expand all
83 } 84 }
84 85
85 void TetherService::OnPrefsChanged() { 86 void TetherService::OnPrefsChanged() {
86 if (IsAllowed() && IsEnabled()) { 87 if (IsAllowed() && IsEnabled()) {
87 StartTether(); 88 StartTether();
88 return; 89 return;
89 } 90 }
90 91
91 chromeos::tether::Initializer::Shutdown(); 92 chromeos::tether::Initializer::Shutdown();
92 } 93 }
OLDNEW
« 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