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

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

Issue 1223983002: Move WriteInto to base namespace. (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
« no previous file with comments | « components/storage_monitor/volume_mount_watcher_win.cc ('k') | content/common/sandbox_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 LOG(ERROR) << error; 1135 LOG(ERROR) << error;
1136 return error; 1136 return error;
1137 } 1137 }
1138 1138
1139 DWORD WiFiServiceImpl::FindAdapterIndexMapByGUID( 1139 DWORD WiFiServiceImpl::FindAdapterIndexMapByGUID(
1140 const GUID& interface_guid, 1140 const GUID& interface_guid,
1141 IP_ADAPTER_INDEX_MAP* adapter_index_map) { 1141 IP_ADAPTER_INDEX_MAP* adapter_index_map) {
1142 base::string16 guid_string; 1142 base::string16 guid_string;
1143 const int kGUIDSize = 39; 1143 const int kGUIDSize = 39;
1144 ::StringFromGUID2( 1144 ::StringFromGUID2(
1145 interface_guid, WriteInto(&guid_string, kGUIDSize), kGUIDSize); 1145 interface_guid, base::WriteInto(&guid_string, kGUIDSize), kGUIDSize);
1146 1146
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) {
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 DVLOG(1) << "NotifyNetworkChanged: " << network_guid; 1888 DVLOG(1) << "NotifyNetworkChanged: " << network_guid;
1889 NetworkGuidList changed_networks(1, network_guid); 1889 NetworkGuidList changed_networks(1, network_guid);
1890 event_task_runner_->PostTask( 1890 event_task_runner_->PostTask(
1891 FROM_HERE, base::Bind(networks_changed_observer_, changed_networks)); 1891 FROM_HERE, base::Bind(networks_changed_observer_, changed_networks));
1892 } 1892 }
1893 } 1893 }
1894 1894
1895 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } 1895 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); }
1896 1896
1897 } // namespace wifi 1897 } // namespace wifi
OLDNEW
« no previous file with comments | « components/storage_monitor/volume_mount_watcher_win.cc ('k') | content/common/sandbox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698