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 // 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/win/lib/rlz_lib.h" | 8 #include "rlz/win/lib/rlz_lib.h" |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 } // namespace anonymous | 49 } // namespace anonymous |
50 | 50 |
51 | 51 |
52 namespace rlz_lib { | 52 namespace rlz_lib { |
53 | 53 |
54 // OEM Deal confirmation storage functions. | 54 // OEM Deal confirmation storage functions. |
55 | 55 |
56 template<class T> | 56 template<class T> |
57 class typed_buffer_ptr { | 57 class typed_buffer_ptr { |
58 scoped_array<char> buffer_; | 58 scoped_ptr<char[]> buffer_; |
59 | 59 |
60 public: | 60 public: |
61 typed_buffer_ptr() { | 61 typed_buffer_ptr() { |
62 } | 62 } |
63 | 63 |
64 explicit typed_buffer_ptr(size_t size) : buffer_(new char[size]) { | 64 explicit typed_buffer_ptr(size_t size) : buffer_(new char[size]) { |
65 } | 65 } |
66 | 66 |
67 void reset(size_t size) { | 67 void reset(size_t size) { |
68 buffer_.reset(new char[size]); | 68 buffer_.reset(new char[size]); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 base::win::RegKey dest(temp_hklm_key.Handle(), kHKLMAccessProviders, | 251 base::win::RegKey dest(temp_hklm_key.Handle(), kHKLMAccessProviders, |
252 KEY_ALL_ACCESS); | 252 KEY_ALL_ACCESS); |
253 CopyRegistryTree(base::win::RegKey(HKEY_LOCAL_MACHINE, | 253 CopyRegistryTree(base::win::RegKey(HKEY_LOCAL_MACHINE, |
254 kHKLMAccessProviders, | 254 kHKLMAccessProviders, |
255 KEY_READ), | 255 KEY_READ), |
256 &dest); | 256 &dest); |
257 } | 257 } |
258 } | 258 } |
259 | 259 |
260 } // namespace rlz_lib | 260 } // namespace rlz_lib |
OLD | NEW |