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

Unified Diff: base/files/file_path.cc

Issue 2053953002: Add chrome_crash_reporter_client_win.cc to the source file list for chrome_elf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix kasko annotations Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/logging.cc » ('j') | base/logging.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path.cc
diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index 2c199e131a56ee1976dded1dd25af158ac1c6252..cb00b446d1dd8799e8e7fdcf965892ee09940c0e 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -693,6 +693,10 @@ bool FilePath::ReadFromPickle(PickleIterator* iter) {
int FilePath::CompareIgnoreCase(StringPieceType string1,
StringPieceType string2) {
+ using CharUpperFunction = wchar_t*(WINAPI*)(wchar_t * str);
+ CharUpperFunction char_upper_api = reinterpret_cast<CharUpperFunction>(
+ ::GetProcAddress(::GetModuleHandle(L"user32.dll"), "CharUpperW"));
ananta 2016/06/10 05:54:57 Will change this to use a static function pointer.
+ CHECK(char_upper_api);
// Perform character-wise upper case comparison rather than using the
// fully Unicode-aware CompareString(). For details see:
// http://blogs.msdn.com/michkap/archive/2005/10/17/481600.aspx
scottmg 2016/06/10 19:36:19 The linked blog post http://web.archive.org/web/2
@@ -702,9 +706,9 @@ int FilePath::CompareIgnoreCase(StringPieceType string1,
StringPieceType::const_iterator string2end = string2.end();
for ( ; i1 != string1end && i2 != string2end; ++i1, ++i2) {
wchar_t c1 =
- (wchar_t)LOWORD(::CharUpperW((LPWSTR)(DWORD_PTR)MAKELONG(*i1, 0)));
+ (wchar_t)LOWORD(char_upper_api((LPWSTR)(DWORD_PTR)MAKELONG(*i1, 0)));
wchar_t c2 =
- (wchar_t)LOWORD(::CharUpperW((LPWSTR)(DWORD_PTR)MAKELONG(*i2, 0)));
+ (wchar_t)LOWORD(char_upper_api((LPWSTR)(DWORD_PTR)MAKELONG(*i2, 0)));
if (c1 < c2)
return -1;
if (c1 > c2)
« no previous file with comments | « no previous file | base/logging.cc » ('j') | base/logging.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698