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

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

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 // Generates an 8 digit hash from the input given. 314 // Generates an 8 digit hash from the input given.
315 static void GenerateHash(const std::string& input, std::string* output) { 315 static void GenerateHash(const std::string& input, std::string* output) {
316 if (input.empty()) { 316 if (input.empty()) {
317 *output = ""; 317 *output = "";
318 return; 318 return;
319 } 319 }
320 320
321 uint8 hash[4]; 321 uint8 hash[4];
322 crypto::SHA256HashString(input, hash, sizeof(hash)); 322 crypto::SHA256HashString(input, hash, sizeof(hash));
323 *output = StringToLowerASCII(base::HexEncode(hash, sizeof(hash))); 323 *output = base::StringToLowerASCII(base::HexEncode(hash, sizeof(hash)));
324 } 324 }
325 325
326 // ----------------------------------------------------------------------------- 326 // -----------------------------------------------------------------------------
327 327
328 // static 328 // static
329 void ModuleEnumerator::NormalizeModule(Module* module) { 329 void ModuleEnumerator::NormalizeModule(Module* module) {
330 base::string16 path = module->location; 330 base::string16 path = module->location;
331 if (!ConvertToLongPath(path, &module->location)) 331 if (!ConvertToLongPath(path, &module->location))
332 module->location = path; 332 module->location = path;
333 333
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 GenerateHash(base::WideToUTF8(module.location), &location); 1037 GenerateHash(base::WideToUTF8(module.location), &location);
1038 GenerateHash(base::WideToUTF8(module.description), &description); 1038 GenerateHash(base::WideToUTF8(module.description), &description);
1039 GenerateHash(base::WideToUTF8(module.digital_signer), &signer); 1039 GenerateHash(base::WideToUTF8(module.digital_signer), &signer);
1040 1040
1041 base::string16 url = 1041 base::string16 url =
1042 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, 1042 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS,
1043 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location), 1043 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location),
1044 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer)); 1044 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer));
1045 return GURL(base::UTF16ToUTF8(url)); 1045 return GURL(base::UTF16ToUTF8(url));
1046 } 1046 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698