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

Side by Side Diff: chrome/browser/enumerate_modules_model_win.cc

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 #include "chrome/browser/enumerate_modules_model_win.h" 5 #include "chrome/browser/enumerate_modules_model_win.h"
6 6
7 #include <Tlhelp32.h> 7 #include <Tlhelp32.h>
8 #include <wintrust.h> 8 #include <wintrust.h>
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 // Generates an 8 digit hash from the input given. 343 // Generates an 8 digit hash from the input given.
344 static void GenerateHash(const std::string& input, std::string* output) { 344 static void GenerateHash(const std::string& input, std::string* output) {
345 if (input.empty()) { 345 if (input.empty()) {
346 *output = ""; 346 *output = "";
347 return; 347 return;
348 } 348 }
349 349
350 uint8 hash[4]; 350 uint8 hash[4];
351 crypto::SHA256HashString(input, hash, sizeof(hash)); 351 crypto::SHA256HashString(input, hash, sizeof(hash));
352 *output = base::StringToLowerASCII(base::HexEncode(hash, sizeof(hash))); 352 *output = base::ToLowerASCII(base::HexEncode(hash, sizeof(hash)));
353 } 353 }
354 354
355 // ----------------------------------------------------------------------------- 355 // -----------------------------------------------------------------------------
356 356
357 // static 357 // static
358 void ModuleEnumerator::NormalizeModule(Module* module) { 358 void ModuleEnumerator::NormalizeModule(Module* module) {
359 base::string16 path = module->location; 359 base::string16 path = module->location;
360 if (!ConvertToLongPath(path, &module->location)) 360 if (!ConvertToLongPath(path, &module->location))
361 module->location = path; 361 module->location = path;
362 362
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 GenerateHash(base::WideToUTF8(module.location), &location); 1068 GenerateHash(base::WideToUTF8(module.location), &location);
1069 GenerateHash(base::WideToUTF8(module.description), &description); 1069 GenerateHash(base::WideToUTF8(module.description), &description);
1070 GenerateHash(base::WideToUTF8(module.digital_signer), &signer); 1070 GenerateHash(base::WideToUTF8(module.digital_signer), &signer);
1071 1071
1072 base::string16 url = 1072 base::string16 url =
1073 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, 1073 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS,
1074 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location), 1074 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location),
1075 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer)); 1075 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer));
1076 return GURL(base::UTF16ToUTF8(url)); 1076 return GURL(base::UTF16ToUTF8(url));
1077 } 1077 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698