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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_win.cc

Issue 113403006: Update some uses of char16 to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Windows Vista uses the Native Wifi (WLAN) API for accessing WiFi cards. See 5 // Windows Vista uses the Native Wifi (WLAN) API for accessing WiFi cards. See
6 // http://msdn.microsoft.com/en-us/library/ms705945(VS.85).aspx. Windows XP 6 // http://msdn.microsoft.com/en-us/library/ms705945(VS.85).aspx. Windows XP
7 // Service Pack 3 (and Windows XP Service Pack 2, if upgraded with a hot fix) 7 // Service Pack 3 (and Windows XP Service Pack 2, if upgraded with a hot fix)
8 // also support a limited version of the WLAN API. See 8 // also support a limited version of the WLAN API. See
9 // http://msdn.microsoft.com/en-us/library/bb204766.aspx. The WLAN API uses 9 // http://msdn.microsoft.com/en-us/library/bb204766.aspx. The WLAN API uses
10 // wlanapi.h, which is not part of the SDK used by Gears, so is replicated 10 // wlanapi.h, which is not part of the SDK used by Gears, so is replicated
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 return buffer != NULL; 610 return buffer != NULL;
611 } 611 }
612 612
613 bool GetSystemDirectory(base::string16* path) { 613 bool GetSystemDirectory(base::string16* path) {
614 DCHECK(path); 614 DCHECK(path);
615 // Return value includes terminating NULL. 615 // Return value includes terminating NULL.
616 int buffer_size = ::GetSystemDirectory(NULL, 0); 616 int buffer_size = ::GetSystemDirectory(NULL, 0);
617 if (buffer_size == 0) { 617 if (buffer_size == 0) {
618 return false; 618 return false;
619 } 619 }
620 scoped_ptr<char16[]> buffer(new char16[buffer_size]); 620 scoped_ptr<base::char16[]> buffer(new base::char16[buffer_size]);
621 621
622 // Return value excludes terminating NULL. 622 // Return value excludes terminating NULL.
623 int characters_written = ::GetSystemDirectory(buffer.get(), buffer_size); 623 int characters_written = ::GetSystemDirectory(buffer.get(), buffer_size);
624 if (characters_written == 0) { 624 if (characters_written == 0) {
625 return false; 625 return false;
626 } 626 }
627 DCHECK_EQ(buffer_size - 1, characters_written); 627 DCHECK_EQ(buffer_size - 1, characters_written);
628 628
629 path->assign(buffer.get(), characters_written); 629 path->assign(buffer.get(), characters_written);
630 630
631 if (*path->rbegin() != L'\\') { 631 if (*path->rbegin() != L'\\') {
632 path->append(L"\\"); 632 path->append(L"\\");
633 } 633 }
634 DCHECK_EQ(L'\\', *path->rbegin()); 634 DCHECK_EQ(L'\\', *path->rbegin());
635 return true; 635 return true;
636 } 636 }
637 } // namespace 637 } // namespace
638 638
639 } // namespace content 639 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/drag_download_util.cc ('k') | content/browser/indexed_db/indexed_db_leveldb_coding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698