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

Side by Side Diff: rlz/win/lib/machine_deal.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 | « rlz/lib/rlz_lib.cc ('k') | sql/connection.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 // Library functions related to the OEM Deal Confirmation Code. 5 // Library functions related to the OEM Deal Confirmation Code.
6 6
7 #include "rlz/win/lib/machine_deal.h" 7 #include "rlz/win/lib/machine_deal.h"
8 8
9 #include <windows.h> 9 #include <windows.h>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 #include "rlz/win/lib/rlz_value_store_registry.h" 22 #include "rlz/win/lib/rlz_value_store_registry.h"
23 23
24 namespace { 24 namespace {
25 25
26 const wchar_t kDccValueName[] = L"DCC"; 26 const wchar_t kDccValueName[] = L"DCC";
27 27
28 // Current DCC can only uses [a-zA-Z0-9_-!@$*();.<>,:] 28 // Current DCC can only uses [a-zA-Z0-9_-!@$*();.<>,:]
29 // We will be more liberal and allow some additional chars, but not url meta 29 // We will be more liberal and allow some additional chars, but not url meta
30 // chars. 30 // chars.
31 bool IsGoodDccChar(char ch) { 31 bool IsGoodDccChar(char ch) {
32 if (IsAsciiAlpha(ch) || IsAsciiDigit(ch)) 32 if (base::IsAsciiAlpha(ch) || base::IsAsciiDigit(ch))
33 return true; 33 return true;
34 34
35 switch (ch) { 35 switch (ch) {
36 case '_': 36 case '_':
37 case '-': 37 case '-':
38 case '!': 38 case '!':
39 case '@': 39 case '@':
40 case '$': 40 case '$':
41 case '*': 41 case '*':
42 case '(': 42 case '(':
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 DWORD dcc_size = arraysize(dcc); 291 DWORD dcc_size = arraysize(dcc);
292 if (dcc_key.ReadValue(kDccValueName, dcc, &dcc_size, NULL) == ERROR_SUCCESS) { 292 if (dcc_key.ReadValue(kDccValueName, dcc, &dcc_size, NULL) == ERROR_SUCCESS) {
293 ASSERT_STRING("MachineDealCode::Clear: Could not delete the DCC value."); 293 ASSERT_STRING("MachineDealCode::Clear: Could not delete the DCC value.");
294 return false; 294 return false;
295 } 295 }
296 296
297 return true; 297 return true;
298 } 298 }
299 299
300 } // namespace rlz_lib 300 } // namespace rlz_lib
OLDNEW
« no previous file with comments | « rlz/lib/rlz_lib.cc ('k') | sql/connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698