| OLD | NEW |
| 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 <stddef.h> | 10 #include <stddef.h> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "base/win/registry.h" | 17 #include "base/win/registry.h" |
| 18 #include "rlz/lib/assert.h" | 18 #include "rlz/lib/assert.h" |
| 19 #include "rlz/lib/lib_values.h" | 19 #include "rlz/lib/lib_values.h" |
| 20 #include "rlz/lib/net_response_check.h" |
| 20 #include "rlz/win/lib/lib_mutex.h" | 21 #include "rlz/win/lib/lib_mutex.h" |
| 21 #include "rlz/win/lib/registry_util.h" | 22 #include "rlz/win/lib/registry_util.h" |
| 22 #include "rlz/win/lib/rlz_value_store_registry.h" | 23 #include "rlz/win/lib/rlz_value_store_registry.h" |
| 23 | 24 |
| 24 namespace { | 25 namespace { |
| 25 | 26 |
| 26 const wchar_t kDccValueName[] = L"DCC"; | 27 const wchar_t kDccValueName[] = L"DCC"; |
| 27 | 28 |
| 28 // Current DCC can only uses [a-zA-Z0-9_-!@$*();.<>,:] | 29 // Current DCC can only uses [a-zA-Z0-9_-!@$*();.<>,:] |
| 29 // We will be more liberal and allow some additional chars, but not url meta | 30 // We will be more liberal and allow some additional chars, but not url meta |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 DWORD dcc_size = arraysize(dcc); | 293 DWORD dcc_size = arraysize(dcc); |
| 293 if (dcc_key.ReadValue(kDccValueName, dcc, &dcc_size, NULL) == ERROR_SUCCESS) { | 294 if (dcc_key.ReadValue(kDccValueName, dcc, &dcc_size, NULL) == ERROR_SUCCESS) { |
| 294 ASSERT_STRING("MachineDealCode::Clear: Could not delete the DCC value."); | 295 ASSERT_STRING("MachineDealCode::Clear: Could not delete the DCC value."); |
| 295 return false; | 296 return false; |
| 296 } | 297 } |
| 297 | 298 |
| 298 return true; | 299 return true; |
| 299 } | 300 } |
| 300 | 301 |
| 301 } // namespace rlz_lib | 302 } // namespace rlz_lib |
| OLD | NEW |