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

Side by Side Diff: rlz/win/lib/machine_deal.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger 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') | sandbox/linux/services/yama_unittests.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 bool GetResponseValue(const std::string& response_line, 98 bool GetResponseValue(const std::string& response_line,
99 const std::string& response_key, 99 const std::string& response_key,
100 std::string* value) { 100 std::string* value) {
101 if (!value) 101 if (!value)
102 return false; 102 return false;
103 103
104 value->clear(); 104 value->clear();
105 105
106 if (!StartsWithASCII(response_line, response_key, true)) 106 if (!base::StartsWithASCII(response_line, response_key, true))
107 return false; 107 return false;
108 108
109 std::vector<std::string> tokens; 109 std::vector<std::string> tokens;
110 base::SplitString(response_line, ':', &tokens); 110 base::SplitString(response_line, ':', &tokens);
111 if (tokens.size() != 2) 111 if (tokens.size() != 2)
112 return false; 112 return false;
113 113
114 // The first token is the key, the second is the value. The value is already 114 // The first token is the key, the second is the value. The value is already
115 // trimmed for whitespace. 115 // trimmed for whitespace.
116 *value = tokens[1]; 116 *value = tokens[1];
(...skipping 174 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') | sandbox/linux/services/yama_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698