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

Side by Side Diff: components/wifi/wifi_service_win.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/wifi/wifi_service.h" 5 #include "components/wifi/wifi_service.h"
6 6
7 #include <iphlpapi.h> 7 #include <iphlpapi.h>
8 #include <objbase.h> 8 #include <objbase.h>
9 #include <wlanapi.h> 9 #include <wlanapi.h>
10 10
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 ULONG buffer_length = 0; 1147 ULONG buffer_length = 0;
1148 DWORD error = ::GetInterfaceInfo(NULL, &buffer_length); 1148 DWORD error = ::GetInterfaceInfo(NULL, &buffer_length);
1149 if (error == ERROR_INSUFFICIENT_BUFFER) { 1149 if (error == ERROR_INSUFFICIENT_BUFFER) {
1150 scoped_ptr<unsigned char[]> buffer(new unsigned char[buffer_length]); 1150 scoped_ptr<unsigned char[]> buffer(new unsigned char[buffer_length]);
1151 IP_INTERFACE_INFO* interface_info = 1151 IP_INTERFACE_INFO* interface_info =
1152 reinterpret_cast<IP_INTERFACE_INFO*>(buffer.get()); 1152 reinterpret_cast<IP_INTERFACE_INFO*>(buffer.get());
1153 error = GetInterfaceInfo(interface_info, &buffer_length); 1153 error = GetInterfaceInfo(interface_info, &buffer_length);
1154 if (error == ERROR_SUCCESS) { 1154 if (error == ERROR_SUCCESS) {
1155 for (int adapter = 0; adapter < interface_info->NumAdapters; ++adapter) { 1155 for (int adapter = 0; adapter < interface_info->NumAdapters; ++adapter) {
1156 if (base::EndsWith( 1156 if (base::EndsWith(
1157 interface_info->Adapter[adapter].Name, guid_string, false)) { 1157 interface_info->Adapter[adapter].Name, guid_string,
1158 base::CompareCase::INSENSITIVE_ASCII)) {
1158 *adapter_index_map = interface_info->Adapter[adapter]; 1159 *adapter_index_map = interface_info->Adapter[adapter];
1159 break; 1160 break;
1160 } 1161 }
1161 } 1162 }
1162 } 1163 }
1163 } 1164 }
1164 return error; 1165 return error;
1165 } 1166 }
1166 1167
1167 DWORD WiFiServiceImpl::DisableNwCategoryWizard() { 1168 DWORD WiFiServiceImpl::DisableNwCategoryWizard() {
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 DVLOG(1) << "NotifyNetworkChanged: " << network_guid; 1889 DVLOG(1) << "NotifyNetworkChanged: " << network_guid;
1889 NetworkGuidList changed_networks(1, network_guid); 1890 NetworkGuidList changed_networks(1, network_guid);
1890 event_task_runner_->PostTask( 1891 event_task_runner_->PostTask(
1891 FROM_HERE, base::Bind(networks_changed_observer_, changed_networks)); 1892 FROM_HERE, base::Bind(networks_changed_observer_, changed_networks));
1892 } 1893 }
1893 } 1894 }
1894 1895
1895 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } 1896 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); }
1896 1897
1897 } // namespace wifi 1898 } // namespace wifi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698