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

Side by Side Diff: chrome_frame/registry_list_preferences_holder.cc

Issue 9720001: Add a setting to CF to remove 'chromeframe' from the UserAgent on a per-pattern basis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor tweak to UA building. Created 8 years, 9 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
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 //
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698