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

Side by Side Diff: components/offline_pages/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/offline_pages/background/connection_notifier.h"
6
7 namespace offline_pages {
8
9 ConnectionNotifier::ConnectionNotifier(
10 const ConnectionNotifier::ConnectedCallback& callback)
11 : callback_(callback) {
12 net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
13 }
14
15 ConnectionNotifier::~ConnectionNotifier() {
16 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
17 }
18
19 void ConnectionNotifier::OnConnectionTypeChanged(
20 net::NetworkChangeNotifier::ConnectionType type) {
21 if (type != net::NetworkChangeNotifier::ConnectionType::CONNECTION_NONE)
22 callback_.Run();
23 }
24
25 } // namespace offline_pages
OLDNEW
« no previous file with comments | « components/offline_pages/background/connection_notifier.h ('k') | components/offline_pages/background/device_conditions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698