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

Side by Side Diff: rlz/lib/rlz_lib.cc

Issue 1200053004: Move more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | rlz/win/lib/machine_deal.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) 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 // A library to manage RLZ information for access-points shared 5 // A library to manage RLZ information for access-points shared
6 // across different client applications. 6 // across different client applications.
7 7
8 #include "rlz/lib/rlz_lib.h" 8 #include "rlz/lib/rlz_lib.h"
9 9
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 default: 52 default:
53 return true; 53 return true;
54 } 54 }
55 } 55 }
56 56
57 // Current RLZ can only use [a-zA-Z0-9_\-] 57 // Current RLZ can only use [a-zA-Z0-9_\-]
58 // We will be more liberal and allow some additional chars, but not url meta 58 // We will be more liberal and allow some additional chars, but not url meta
59 // chars. 59 // chars.
60 bool IsGoodRlzChar(const char ch) { 60 bool IsGoodRlzChar(const char ch) {
61 if (IsAsciiAlpha(ch) || IsAsciiDigit(ch)) 61 if (base::IsAsciiAlpha(ch) || base::IsAsciiDigit(ch))
62 return true; 62 return true;
63 63
64 switch (ch) { 64 switch (ch) {
65 case '_': 65 case '_':
66 case '-': 66 case '-':
67 case '!': 67 case '!':
68 case '@': 68 case '@':
69 case '$': 69 case '$':
70 case '*': 70 case '*':
71 case '(': 71 case '(':
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 if (cgi_string.size() >= cgi_size) 644 if (cgi_string.size() >= cgi_size)
645 return false; 645 return false;
646 646
647 strncpy(cgi, cgi_string.c_str(), cgi_size); 647 strncpy(cgi, cgi_string.c_str(), cgi_size);
648 cgi[cgi_size - 1] = 0; 648 cgi[cgi_size - 1] = 0;
649 649
650 return true; 650 return true;
651 } 651 }
652 652
653 } // namespace rlz_lib 653 } // namespace rlz_lib
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | rlz/win/lib/machine_deal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698