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

Side by Side Diff: chrome_frame/registry_list_preferences_holder.cc

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome_frame/registry_list_preferences_holder.h ('k') | chrome_frame/registry_watcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
5 #include "chrome_frame/registry_list_preferences_holder.h"
6
7 #include "base/strings/string_util.h"
8 #include "base/win/registry.h"
9
10 RegistryListPreferencesHolder::RegistryListPreferencesHolder() : valid_(false) {
11 }
12
13 void RegistryListPreferencesHolder::Init(HKEY hive,
14 const wchar_t* registry_path,
15 const wchar_t* list_name) {
16 base::string16 list_path(registry_path);
17 list_path += L"\\";
18 list_path += list_name;
19 base::win::RegistryValueIterator string_list(hive, list_path.c_str());
20 for (; string_list.Valid(); ++string_list)
21 values_.push_back(string_list.Name());
22
23 valid_ = true;
24 }
25
26 bool RegistryListPreferencesHolder::ListMatches(const base::string16& string)
27 const {
28 DCHECK(Valid());
29 std::vector<base::string16>::const_iterator iter(values_.begin());
30 for (; iter != values_.end(); ++iter) {
31 if (MatchPattern(string, *iter))
32 return true;
33 }
34
35 return false;
36 }
37
38 void RegistryListPreferencesHolder::AddStringForTesting(
39 const base::string16& string) {
40 values_.push_back(string);
41 }
42
43 void RegistryListPreferencesHolder::ResetForTesting() {
44 values_.clear();
45 valid_ = false;
46 }
OLDNEW
« no previous file with comments | « chrome_frame/registry_list_preferences_holder.h ('k') | chrome_frame/registry_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698