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

Side by Side Diff: components/signin/core/browser/signin_internals_util.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/signin/core/browser/signin_internals_util.h" 5 #include "components/signin/core/browser/signin_internals_util.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 std::string GetTruncatedHash(const std::string& str) { 61 std::string GetTruncatedHash(const std::string& str) {
62 if (str.empty()) 62 if (str.empty())
63 return str; 63 return str;
64 64
65 // Since each character in the hash string generates two hex charaters 65 // Since each character in the hash string generates two hex charaters
66 // we only need half as many charaters in |hash_val| as hex characters 66 // we only need half as many charaters in |hash_val| as hex characters
67 // returned. 67 // returned.
68 const int kTruncateSize = kTruncateTokenStringLength / 2; 68 const int kTruncateSize = kTruncateTokenStringLength / 2;
69 char hash_val[kTruncateSize]; 69 char hash_val[kTruncateSize];
70 crypto::SHA256HashString(str, &hash_val[0], kTruncateSize); 70 crypto::SHA256HashString(str, &hash_val[0], kTruncateSize);
71 return base::StringToLowerASCII(base::HexEncode(&hash_val[0], kTruncateSize)); 71 return base::ToLowerASCII(base::HexEncode(&hash_val[0], kTruncateSize));
72 } 72 }
73 73
74 } // namespace signin_internals_util 74 } // namespace signin_internals_util
OLDNEW
« no previous file with comments | « components/query_parser/snippet_unittest.cc ('k') | components/storage_monitor/media_storage_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698