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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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
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 #include "net/base/network_change_notifier.h" 5 #include "net/base/network_change_notifier.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 if (!g_network_change_notifier) { 548 if (!g_network_change_notifier) {
549 *config = DnsConfig(); 549 *config = DnsConfig();
550 } else { 550 } else {
551 g_network_change_notifier->network_state_->GetDnsConfig(config); 551 g_network_change_notifier->network_state_->GetDnsConfig(config);
552 } 552 }
553 } 553 }
554 554
555 // static 555 // static
556 const char* NetworkChangeNotifier::ConnectionTypeToString( 556 const char* NetworkChangeNotifier::ConnectionTypeToString(
557 ConnectionType type) { 557 ConnectionType type) {
558 static const char* kConnectionTypeNames[] = { 558 static const char* const kConnectionTypeNames[] = {
559 "CONNECTION_UNKNOWN", 559 "CONNECTION_UNKNOWN",
560 "CONNECTION_ETHERNET", 560 "CONNECTION_ETHERNET",
561 "CONNECTION_WIFI", 561 "CONNECTION_WIFI",
562 "CONNECTION_2G", 562 "CONNECTION_2G",
563 "CONNECTION_3G", 563 "CONNECTION_3G",
564 "CONNECTION_4G", 564 "CONNECTION_4G",
565 "CONNECTION_NONE", 565 "CONNECTION_NONE",
566 "CONNECTION_BLUETOOTH" 566 "CONNECTION_BLUETOOTH"
567 }; 567 };
568 static_assert(arraysize(kConnectionTypeNames) == 568 static_assert(arraysize(kConnectionTypeNames) ==
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 DCHECK(g_network_change_notifier); 958 DCHECK(g_network_change_notifier);
959 g_network_change_notifier = NULL; 959 g_network_change_notifier = NULL;
960 } 960 }
961 961
962 NetworkChangeNotifier::DisableForTest::~DisableForTest() { 962 NetworkChangeNotifier::DisableForTest::~DisableForTest() {
963 DCHECK(!g_network_change_notifier); 963 DCHECK(!g_network_change_notifier);
964 g_network_change_notifier = network_change_notifier_; 964 g_network_change_notifier = network_change_notifier_;
965 } 965 }
966 966
967 } // namespace net 967 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698