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

Side by Side Diff: base/win/registry.h

Issue 1441543002: Make vector_as_array use std::vector::data and switch a few directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark comment Created 5 years, 1 month 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 | « base/trace_event/process_memory_dump.cc ('k') | base/win/registry.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 #ifndef BASE_WIN_REGISTRY_H_ 5 #ifndef BASE_WIN_REGISTRY_H_
6 #define BASE_WIN_REGISTRY_H_ 6 #define BASE_WIN_REGISTRY_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/base_export.h" 12 #include "base/base_export.h"
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/stl_util.h"
15 #include "base/win/object_watcher.h" 14 #include "base/win/object_watcher.h"
16 #include "base/win/scoped_handle.h" 15 #include "base/win/scoped_handle.h"
17 16
18 namespace base { 17 namespace base {
19 namespace win { 18 namespace win {
20 19
21 // Utility class to read, write and manipulate the Windows Registry. 20 // Utility class to read, write and manipulate the Windows Registry.
22 // Registry vocabulary primer: a "key" is like a folder, in which there 21 // Registry vocabulary primer: a "key" is like a folder, in which there
23 // are "values", which are <name, data> pairs, with an associated data type. 22 // are "values", which are <name, data> pairs, with an associated data type.
24 // 23 //
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 172
174 DWORD ValueCount() const; 173 DWORD ValueCount() const;
175 174
176 // True while the iterator is valid. 175 // True while the iterator is valid.
177 bool Valid() const; 176 bool Valid() const;
178 177
179 // Advances to the next registry entry. 178 // Advances to the next registry entry.
180 void operator++(); 179 void operator++();
181 180
182 const wchar_t* Name() const { return name_.c_str(); } 181 const wchar_t* Name() const { return name_.c_str(); }
183 const wchar_t* Value() const { return vector_as_array(&value_); } 182 const wchar_t* Value() const { return value_.data(); }
184 // ValueSize() is in bytes. 183 // ValueSize() is in bytes.
185 DWORD ValueSize() const { return value_size_; } 184 DWORD ValueSize() const { return value_size_; }
186 DWORD Type() const { return type_; } 185 DWORD Type() const { return type_; }
187 186
188 int Index() const { return index_; } 187 int Index() const { return index_; }
189 188
190 private: 189 private:
191 // Read in the current values. 190 // Read in the current values.
192 bool Read(); 191 bool Read();
193 192
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 249
251 wchar_t name_[MAX_PATH]; 250 wchar_t name_[MAX_PATH];
252 251
253 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator); 252 DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator);
254 }; 253 };
255 254
256 } // namespace win 255 } // namespace win
257 } // namespace base 256 } // namespace base
258 257
259 #endif // BASE_WIN_REGISTRY_H_ 258 #endif // BASE_WIN_REGISTRY_H_
OLDNEW
« no previous file with comments | « base/trace_event/process_memory_dump.cc ('k') | base/win/registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698