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

Side by Side Diff: components/offline_pages/core/background/connection_notifier.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/offline_pages/background/connection_notifier.h" 5 #include "components/offline_pages/core/background/connection_notifier.h"
6 6
7 namespace offline_pages { 7 namespace offline_pages {
8 8
9 ConnectionNotifier::ConnectionNotifier( 9 ConnectionNotifier::ConnectionNotifier(
10 const ConnectionNotifier::ConnectedCallback& callback) 10 const ConnectionNotifier::ConnectedCallback& callback)
11 : callback_(callback) { 11 : callback_(callback) {
12 net::NetworkChangeNotifier::AddConnectionTypeObserver(this); 12 net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
13 } 13 }
14 14
15 ConnectionNotifier::~ConnectionNotifier() { 15 ConnectionNotifier::~ConnectionNotifier() {
16 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); 16 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
17 } 17 }
18 18
19 void ConnectionNotifier::OnConnectionTypeChanged( 19 void ConnectionNotifier::OnConnectionTypeChanged(
20 net::NetworkChangeNotifier::ConnectionType type) { 20 net::NetworkChangeNotifier::ConnectionType type) {
21 if (type != net::NetworkChangeNotifier::ConnectionType::CONNECTION_NONE) 21 if (type != net::NetworkChangeNotifier::ConnectionType::CONNECTION_NONE)
22 callback_.Run(); 22 callback_.Run();
23 } 23 }
24 24
25 } // namespace offline_pages 25 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698