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

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

Issue 2861583002: [CrOS Tether] Open the Tether settings page when a tether notification body is clicked. (Closed)
Patch Set: stevenjb@ comments. Created 3 years, 7 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 | « chrome/browser/chromeos/net/tether_notification_presenter_unittest.cc ('k') | no next file » | 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/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 TetherService::~TetherService() {} 61 TetherService::~TetherService() {}
62 62
63 void TetherService::StartTetherIfEnabled() { 63 void TetherService::StartTetherIfEnabled() {
64 if (GetTetherTechnologyState() != 64 if (GetTetherTechnologyState() !=
65 chromeos::NetworkStateHandler::TechnologyState::TECHNOLOGY_ENABLED) { 65 chromeos::NetworkStateHandler::TechnologyState::TECHNOLOGY_ENABLED) {
66 return; 66 return;
67 } 67 }
68 68
69 auto notification_presenter = 69 auto notification_presenter =
70 base::MakeUnique<chromeos::tether::TetherNotificationPresenter>( 70 base::MakeUnique<chromeos::tether::TetherNotificationPresenter>(
71 message_center::MessageCenter::Get(), 71 profile_, message_center::MessageCenter::Get(),
72 chromeos::NetworkConnect::Get()); 72 chromeos::NetworkConnect::Get());
73 chromeos::tether::Initializer::Init( 73 chromeos::tether::Initializer::Init(
74 cryptauth_service_, std::move(notification_presenter), 74 cryptauth_service_, std::move(notification_presenter),
75 profile_->GetPrefs(), 75 profile_->GetPrefs(),
76 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_), 76 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_),
77 network_state_handler_, 77 network_state_handler_,
78 chromeos::NetworkHandler::Get()->managed_network_configuration_handler(), 78 chromeos::NetworkHandler::Get()->managed_network_configuration_handler(),
79 chromeos::NetworkConnect::Get(), 79 chromeos::NetworkConnect::Get(),
80 chromeos::NetworkHandler::Get()->network_connection_handler()); 80 chromeos::NetworkHandler::Get()->network_connection_handler());
81 } 81 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // after enabling it. Possible solution: grey out the toggle and tell the 205 // after enabling it. Possible solution: grey out the toggle and tell the
206 // user to turn Bluetooth on? 206 // user to turn Bluetooth on?
207 return chromeos::NetworkStateHandler::TechnologyState:: 207 return chromeos::NetworkStateHandler::TechnologyState::
208 TECHNOLOGY_UNINITIALIZED; 208 TECHNOLOGY_UNINITIALIZED;
209 } else if (!IsEnabledbyPreference()) { 209 } else if (!IsEnabledbyPreference()) {
210 return chromeos::NetworkStateHandler::TechnologyState::TECHNOLOGY_AVAILABLE; 210 return chromeos::NetworkStateHandler::TechnologyState::TECHNOLOGY_AVAILABLE;
211 } 211 }
212 212
213 return chromeos::NetworkStateHandler::TechnologyState::TECHNOLOGY_ENABLED; 213 return chromeos::NetworkStateHandler::TechnologyState::TECHNOLOGY_ENABLED;
214 } 214 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/net/tether_notification_presenter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698