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

Side by Side Diff: net/base/network_change_notifier_linux.cc

Issue 10910076: [net (linux)] Don't send OnIPAddressChanged when the AddressMap is first populated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This implementation of NetworkChangeNotifier's offline state detection 5 // This implementation of NetworkChangeNotifier's offline state detection
6 // depends on D-Bus and NetworkManager, and is known to work on at least 6 // depends on D-Bus and NetworkManager, and is known to work on at least
7 // GNOME version 2.30. If D-Bus or NetworkManager are unavailable, this 7 // GNOME version 2.30. If D-Bus or NetworkManager are unavailable, this
8 // implementation will always behave as if it is online. 8 // implementation will always behave as if it is online.
9 9
10 #include "net/base/network_change_notifier_linux.h" 10 #include "net/base/network_change_notifier_linux.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 base::Bind(&NetworkChangeNotifier:: 278 base::Bind(&NetworkChangeNotifier::
279 NotifyObserversOfIPAddressChange)) { 279 NotifyObserversOfIPAddressChange)) {
280 } 280 }
281 281
282 NetworkChangeNotifierLinux::Thread::~Thread() { 282 NetworkChangeNotifierLinux::Thread::~Thread() {
283 DCHECK(!Thread::IsRunning()); 283 DCHECK(!Thread::IsRunning());
284 } 284 }
285 285
286 void NetworkChangeNotifierLinux::Thread::Init() { 286 void NetworkChangeNotifierLinux::Thread::Init() {
287 network_manager_api_.Init(); 287 network_manager_api_.Init();
288 address_tracker_.Init();
288 dns_config_service_ = DnsConfigService::CreateSystemService(); 289 dns_config_service_ = DnsConfigService::CreateSystemService();
289 dns_config_service_->WatchConfig( 290 dns_config_service_->WatchConfig(
290 base::Bind(&NetworkChangeNotifier::SetDnsConfig)); 291 base::Bind(&NetworkChangeNotifier::SetDnsConfig));
291 address_tracker_.Init();
292 } 292 }
293 293
294 void NetworkChangeNotifierLinux::Thread::CleanUp() { 294 void NetworkChangeNotifierLinux::Thread::CleanUp() {
295 network_manager_api_.CleanUp(); 295 network_manager_api_.CleanUp();
296 dns_config_service_.reset(); 296 dns_config_service_.reset();
297 } 297 }
298 298
299 NetworkChangeNotifierLinux* NetworkChangeNotifierLinux::Create() { 299 NetworkChangeNotifierLinux* NetworkChangeNotifierLinux::Create() {
300 return new NetworkChangeNotifierLinux(NULL); 300 return new NetworkChangeNotifierLinux(NULL);
301 } 301 }
(...skipping 22 matching lines...) Expand all
324 NetworkChangeNotifierLinux::GetCurrentConnectionType() const { 324 NetworkChangeNotifierLinux::GetCurrentConnectionType() const {
325 return notifier_thread_->GetCurrentConnectionType(); 325 return notifier_thread_->GetCurrentConnectionType();
326 } 326 }
327 327
328 const internal::AddressTrackerLinux* 328 const internal::AddressTrackerLinux*
329 NetworkChangeNotifierLinux::GetAddressTrackerInternal() const { 329 NetworkChangeNotifierLinux::GetAddressTrackerInternal() const {
330 return notifier_thread_->address_tracker(); 330 return notifier_thread_->address_tracker();
331 } 331 }
332 332
333 } // namespace net 333 } // namespace net
OLDNEW
« net/base/address_tracker_linux.cc ('K') | « net/base/address_tracker_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698