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

Side by Side Diff: net/android/network_change_notifier_android.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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 //////////////////////////////////////////////////////////////////////////////// 5 ////////////////////////////////////////////////////////////////////////////////
6 // Threading considerations: 6 // Threading considerations:
7 // 7 //
8 // This class is designed to meet various threading guarantees starting from the 8 // This class is designed to meet various threading guarantees starting from the
9 // ones imposed by NetworkChangeNotifier: 9 // ones imposed by NetworkChangeNotifier:
10 // - The notifier can be constructed on any thread. 10 // - The notifier can be constructed on any thread.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // NetworkChangeNotifier::NetworkChangeObserver implementation: 135 // NetworkChangeNotifier::NetworkChangeObserver implementation:
136 void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) override { 136 void OnNetworkChanged(NetworkChangeNotifier::ConnectionType type) override {
137 task_runner()->PostTask( 137 task_runner()->PostTask(
138 FROM_HERE, 138 FROM_HERE,
139 base::Bind(&internal::DnsConfigServicePosix::OnNetworkChanged, 139 base::Bind(&internal::DnsConfigServicePosix::OnNetworkChanged,
140 base::Unretained(dns_config_service_.get()), type)); 140 base::Unretained(dns_config_service_.get()), type));
141 } 141 }
142 142
143 const DnsConfig* dns_config_for_testing_; 143 const DnsConfig* dns_config_for_testing_;
144 const base::Time creation_time_; 144 const base::Time creation_time_;
145 scoped_ptr<internal::DnsConfigServicePosix> dns_config_service_; 145 std::unique_ptr<internal::DnsConfigServicePosix> dns_config_service_;
146 // Used to detect tunnel state changes. 146 // Used to detect tunnel state changes.
147 internal::AddressTrackerLinux address_tracker_; 147 internal::AddressTrackerLinux address_tracker_;
148 148
149 DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceThread); 149 DISALLOW_COPY_AND_ASSIGN(DnsConfigServiceThread);
150 }; 150 };
151 151
152 NetworkChangeNotifierAndroid::~NetworkChangeNotifierAndroid() { 152 NetworkChangeNotifierAndroid::~NetworkChangeNotifierAndroid() {
153 delegate_->RemoveObserver(this); 153 delegate_->RemoveObserver(this);
154 } 154 }
155 155
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 NetworkChangeNotifier::GetConnectionType(); 273 NetworkChangeNotifier::GetConnectionType();
274 NetworkChangeNotifier::LogOperatorCodeHistogram(type); 274 NetworkChangeNotifier::LogOperatorCodeHistogram(type);
275 if (NetworkChangeNotifier::IsConnectionCellular(type)) { 275 if (NetworkChangeNotifier::IsConnectionCellular(type)) {
276 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype", 276 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype",
277 delegate_->GetCurrentConnectionSubtype(), 277 delegate_->GetCurrentConnectionSubtype(),
278 SUBTYPE_LAST + 1); 278 SUBTYPE_LAST + 1);
279 } 279 }
280 } 280 }
281 281
282 } // namespace net 282 } // namespace net
OLDNEW
« no previous file with comments | « net/android/network_change_notifier_android.h ('k') | net/android/network_change_notifier_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698