OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 // | |
slightlyoff1
2012/03/20 15:31:56
clobber empty comment line
grt (UTC plus 2)
2012/03/20 17:27:45
remove
robertshield
2012/03/26 02:43:33
Done.
robertshield
2012/03/26 02:43:33
Done.
| |
5 | |
6 #include "chrome_frame/registry_list_preferences_holder.h" | |
7 | |
8 #include "base/string_util.h" | |
9 #include "base/win/registry.h" | |
10 | |
11 using base::win::RegKey; | |
grt (UTC plus 2)
2012/03/20 17:27:45
remove this
robertshield
2012/03/26 02:43:33
Done.
| |
12 | |
13 RegistryListPreferencesHolder::RegistryListPreferencesHolder() : valid_(false) { | |
14 | |
15 } | |
16 | |
17 void RegistryListPreferencesHolder::Init(HKEY hive, | |
18 const wchar_t* registry_path, | |
19 const wchar_t* list_name) { | |
20 RegKey config_key; | |
grt (UTC plus 2)
2012/03/20 17:27:45
i think you don't need config_key here:
base::win:
robertshield
2012/03/26 02:43:33
Done.
robertshield
2012/03/27 04:33:22
And slightly modified to avoid a regression caused
| |
21 if (config_key.Open(hive, registry_path, | |
22 KEY_QUERY_VALUE) == ERROR_SUCCESS) { | |
23 base::win::RegistryValueIterator string_list(config_key.Handle(), | |
24 list_name); | |
25 while (string_list.Valid()) { | |
26 values_.push_back(string_list.Name()); | |
27 ++string_list; | |
28 } | |
29 } | |
30 | |
31 valid_ = true; | |
32 } | |
33 | |
34 | |
grt (UTC plus 2)
2012/03/20 17:27:45
remove extra newline
robertshield
2012/03/26 02:43:33
Done.
| |
35 bool RegistryListPreferencesHolder::ListMatches(const string16& string) { | |
36 std::vector<string16>::const_iterator iter(values_.begin()); | |
37 for (; iter != values_.end(); ++iter) { | |
38 if (MatchPattern(string, *iter)) { | |
grt (UTC plus 2)
2012/03/20 17:27:45
remove braces
robertshield
2012/03/26 02:43:33
Done.
| |
39 return true; | |
40 } | |
41 } | |
42 | |
43 return false; | |
44 } | |
45 | |
OLD | NEW |