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

Side by Side Diff: extensions/common/id_util.cc

Issue 16632010: Use a direct include of strings headers in extensions/, google_apis/, gpu/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « extensions/common/error_utils.cc ('k') | extensions/common/matcher/regex_set_matcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "extensions/common/id_util.h" 5 #include "extensions/common/id_util.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "crypto/sha2.h" 10 #include "crypto/sha2.h"
11 11
12 namespace { 12 namespace {
13 13
14 // Converts a normal hexadecimal string into the alphabet used by extensions. 14 // Converts a normal hexadecimal string into the alphabet used by extensions.
15 // We use the characters 'a'-'p' instead of '0'-'f' to avoid ever having a 15 // We use the characters 'a'-'p' instead of '0'-'f' to avoid ever having a
16 // completely numeric host, since some software interprets that as an IP 16 // completely numeric host, since some software interprets that as an IP
17 // address. 17 // address.
18 static void ConvertHexadecimalToIDAlphabet(std::string* id) { 18 static void ConvertHexadecimalToIDAlphabet(std::string* id) {
19 for (size_t i = 0; i < id->size(); ++i) { 19 for (size_t i = 0; i < id->size(); ++i) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 path_str[0] += ('A' - 'a'); 64 path_str[0] += ('A' - 'a');
65 65
66 return base::FilePath(path_str); 66 return base::FilePath(path_str);
67 #else 67 #else
68 return path; 68 return path;
69 #endif 69 #endif
70 } 70 }
71 71
72 } // namespace id_util 72 } // namespace id_util
73 } // namespace extensions 73 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/error_utils.cc ('k') | extensions/common/matcher/regex_set_matcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698