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

Unified Diff: chrome_frame/registry_list_preferences_holder.h

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 side-by-side diff with in-line comments
Download patch
Index: chrome_frame/registry_list_preferences_holder.h
diff --git a/chrome_frame/registry_list_preferences_holder.h b/chrome_frame/registry_list_preferences_holder.h
new file mode 100644
index 0000000000000000000000000000000000000000..539c8ea0afd7a365d32114677e064244264cdf1b
--- /dev/null
+++ b/chrome_frame/registry_list_preferences_holder.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A utility class for accessing and caching registry preferences that take
+// the form of lists of strings.
+// TODO(robertshield): Use the RegistryWatcher stuff to keep this list up to
+// date.
+
+#ifndef CHROME_FRAME_HTML_PREFERENCES_HOLDER_H_
grt (UTC plus 2) 2012/03/20 17:27:45 CHROME_FRAME_REGISTRY_LIST_PREFERENCES_HOLDER_H_
robertshield 2012/03/26 02:43:33 Done.
+#define CHROME_FRAME_HTML_PREFERENCES_HOLDER_H_
+#pragma once
+
+#include <windows.h>
+
+#include <vector>
+
+#include "base/string16.h"
+
+class RegistryListPreferencesHolder {
+ public:
+ RegistryListPreferencesHolder();
+
+ void Init(HKEY hive,
+ const wchar_t* registry_path,
+ const wchar_t* list_name);
+
+ bool Valid() { return valid_; }
grt (UTC plus 2) 2012/03/20 17:27:45 Valid() const
robertshield 2012/03/26 02:43:33 Done.
+
+ bool ListMatches(const string16& string);
grt (UTC plus 2) 2012/03/20 17:27:45 ListMatches() const
robertshield 2012/03/26 02:43:33 Done.
+
+ private:
+ std::vector<string16> values_;
+ bool valid_;
+
+ DISALLOW_COPY_AND_ASSIGN(RegistryListPreferencesHolder);
+};
+
+#endif // CHROME_FRAME_HTML_PREFERENCES_HOLDER_H_

Powered by Google App Engine
This is Rietveld 408576698