diff options
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_tab.cc | 4 | ||||
-rw-r--r-- | chrome_frame/crash_reporting/crash_metrics.cc | 6 | ||||
-rw-r--r-- | chrome_frame/policy_settings.cc | 4 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 7 | ||||
-rw-r--r-- | chrome_frame/test/perf/chrome_frame_perftest.cc | 7 | ||||
-rw-r--r-- | chrome_frame/test/policy_settings_unittest.cc | 4 | ||||
-rw-r--r-- | chrome_frame/test/util_unittests.cc | 4 | ||||
-rw-r--r-- | chrome_frame/utils.cc | 12 |
8 files changed, 29 insertions, 19 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc index 013995d..b81be69 100644 --- a/chrome_frame/chrome_tab.cc +++ b/chrome_frame/chrome_tab.cc @@ -17,11 +17,11 @@ #include "base/logging.h" #include "base/logging_win.h" #include "base/path_service.h" -#include "base/registry.h" #include "base/string_number_conversions.h" #include "base/string_piece.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" +#include "base/win/registry.h" #include "base/win/windows_version.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" @@ -40,6 +40,8 @@ #include "chrome_frame/utils.h" #include "googleurl/src/url_util.h" +using base::win::RegKey; + namespace { // This function has the side effect of initializing an unprotected // vector pointer inside GoogleUrl. If this is called during DLL loading, diff --git a/chrome_frame/crash_reporting/crash_metrics.cc b/chrome_frame/crash_reporting/crash_metrics.cc index 3a6c9ee..e5d8fb5 100644 --- a/chrome_frame/crash_reporting/crash_metrics.cc +++ b/chrome_frame/crash_reporting/crash_metrics.cc @@ -5,7 +5,7 @@ #include "chrome_frame/crash_reporting/crash_metrics.h" #include "base/metrics/histogram.h" -#include "base/registry.h" +#include "base/win/registry.h" #include "chrome_frame/utils.h" static const wchar_t kChromeFrameMetricsKey[] = @@ -28,7 +28,7 @@ CrashMetricsReporter* CrashMetricsReporter::GetInstance() { bool CrashMetricsReporter::SetMetric(Metric metric, int value) { DCHECK(metric >= NAVIGATION_COUNT && metric <= LAST_METRIC); - RegKey metric_key; + base::win::RegKey metric_key; if (metric_key.Create(HKEY_CURRENT_USER, kChromeFrameMetricsKey, KEY_SET_VALUE)) { if (metric_key.WriteValue(g_metric_names[metric], value)) { @@ -47,7 +47,7 @@ int CrashMetricsReporter::GetMetric(Metric metric) { DCHECK(metric >= NAVIGATION_COUNT && metric <= LAST_METRIC); int ret = 0; - RegKey metric_key; + base::win::RegKey metric_key; if (metric_key.Open(HKEY_CURRENT_USER, kChromeFrameMetricsKey, KEY_QUERY_VALUE)) { int value = 0; diff --git a/chrome_frame/policy_settings.cc b/chrome_frame/policy_settings.cc index 7e5be2c..d00e69a 100644 --- a/chrome_frame/policy_settings.cc +++ b/chrome_frame/policy_settings.cc @@ -5,9 +5,9 @@ #include "chrome_frame/policy_settings.h" #include "base/logging.h" -#include "base/registry.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" +#include "base/win/registry.h" #include "chrome/common/policy_constants.h" #include "chrome_frame/utils.h" @@ -45,7 +45,7 @@ void PolicySettings::RefreshFromRegistry() { default_renderer_ = RENDERER_NOT_SPECIFIED; renderer_exclusion_list_.clear(); - RegKey config_key; + base::win::RegKey config_key; DWORD value = RENDERER_NOT_SPECIFIED; HKEY root_key[] = { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER }; std::wstring settings_value( diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index e98d353..99fedd2 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -14,13 +14,13 @@ #include "base/file_version_info.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/registry.h" // to find IE and firefox #include "base/scoped_handle.h" #include "base/scoped_ptr.h" #include "base/string_util.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "base/win_util.h" +#include "base/win/registry.h" #include "base/win/windows_version.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_paths.h" @@ -116,7 +116,8 @@ std::wstring GetExecutableAppPath(const std::wstring& file) { L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"; std::wstring app_path; - RegKey key(HKEY_LOCAL_MACHINE, (kAppPathsKey + file).c_str(), KEY_READ); + base::win::RegKey key(HKEY_LOCAL_MACHINE, (kAppPathsKey + file).c_str(), + KEY_READ); if (key.Handle()) { key.ReadValue(NULL, &app_path); } @@ -129,7 +130,7 @@ std::wstring FormatCommandForApp(const std::wstring& exe_name, std::wstring reg_path( base::StringPrintf(L"Applications\\%ls\\shell\\open\\command", exe_name.c_str())); - RegKey key(HKEY_CLASSES_ROOT, reg_path.c_str(), KEY_READ); + base::win::RegKey key(HKEY_CLASSES_ROOT, reg_path.c_str(), KEY_READ); std::wstring command; if (key.Handle()) { diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc index 729f787..34c1183 100644 --- a/chrome_frame/test/perf/chrome_frame_perftest.cc +++ b/chrome_frame/test/perf/chrome_frame_perftest.cc @@ -17,7 +17,6 @@ #include "base/file_util.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/registry.h" #include "base/scoped_ptr.h" #include "base/scoped_bstr_win.h" #include "base/scoped_comptr_win.h" @@ -27,6 +26,7 @@ #include "base/time.h" #include "base/trace_event_win.h" #include "base/utf_string_conversions.h" +#include "base/win/registry.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths_internal.h" @@ -1092,7 +1092,7 @@ TEST_F(ChromeFrameCreationTest, PerfCold) { // from the cache. This could also fail if the Flash control is in use. // On Vista this could fail because of UAC TEST_F(FlashCreationTest, PerfCold) { - RegKey flash_key(HKEY_CLASSES_ROOT, kFlashControlKey, KEY_READ); + base::win::RegKey flash_key(HKEY_CLASSES_ROOT, kFlashControlKey, KEY_READ); std::wstring plugin_path; ASSERT_TRUE(flash_key.ReadValue(L"", &plugin_path)); @@ -1112,7 +1112,8 @@ TEST_F(FlashCreationTest, PerfCold) { // correctly causing the attempt to evict the dll from the system cache to // fail. TEST_F(SilverlightCreationTest, DISABLED_PerfCold) { - RegKey silverlight_key(HKEY_CLASSES_ROOT, kSilverlightControlKey, KEY_READ); + base::win::RegKey silverlight_key(HKEY_CLASSES_ROOT, kSilverlightControlKey, + KEY_READ); std::wstring plugin_path; ASSERT_TRUE(silverlight_key.ReadValue(L"", &plugin_path)); diff --git a/chrome_frame/test/policy_settings_unittest.cc b/chrome_frame/test/policy_settings_unittest.cc index a31e764..52a3c55 100644 --- a/chrome_frame/test/policy_settings_unittest.cc +++ b/chrome_frame/test/policy_settings_unittest.cc @@ -4,14 +4,16 @@ #include "base/basictypes.h" #include "base/logging.h" -#include "base/registry.h" #include "base/scoped_ptr.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" +#include "base/win/registry.h" #include "chrome/common/policy_constants.h" #include "chrome_frame/policy_settings.h" #include "testing/gtest/include/gtest/gtest.h" +using base::win::RegKey; + namespace { // A best effort way to zap CF policy entries that may be in the registry. diff --git a/chrome_frame/test/util_unittests.cc b/chrome_frame/test/util_unittests.cc index 055bae9..bc18062 100644 --- a/chrome_frame/test/util_unittests.cc +++ b/chrome_frame/test/util_unittests.cc @@ -5,12 +5,14 @@ #include "base/file_path.h" #include "base/file_version_info.h" #include "base/file_version_info_win.h" -#include "base/registry.h" +#include "base/win/registry.h" #include "chrome_frame/utils.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/gmock/include/gmock/gmock.h" +using base::win::RegKey; + const wchar_t kChannelName[] = L"-dev"; const wchar_t kSuffix[] = L"-fix"; diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index ec631bd..4437668 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome_frame/utils.h" + #include <htiframe.h> #include <mshtml.h> #include <shlobj.h> @@ -14,7 +16,6 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/path_service.h" -#include "base/registry.h" #include "base/scoped_bstr_win.h" #include "base/scoped_comptr_win.h" #include "base/scoped_variant_win.h" @@ -24,6 +25,7 @@ #include "base/stringprintf.h" #include "base/thread_local.h" #include "base/utf_string_conversions.h" +#include "base/win/registry.h" #include "chrome/common/chrome_paths_internal.h" #include "chrome/common/url_constants.h" #include "chrome/installer/util/chrome_frame_distribution.h" @@ -31,14 +33,14 @@ #include "chrome_frame/html_utils.h" #include "chrome_frame/policy_settings.h" #include "chrome_frame/simple_resource_loader.h" -#include "chrome_frame/utils.h" #include "googleurl/src/gurl.h" #include "googleurl/src/url_canon.h" - #include "grit/chromium_strings.h" #include "net/base/escape.h" #include "net/http/http_util.h" +using base::win::RegKey; + // Note that these values are all lower case and are compared to // lower-case-transformed values. const wchar_t kMetaTag[] = L"meta"; @@ -754,7 +756,7 @@ RendererType RendererTypeForUrl(const std::wstring& url) { } bool match_found = false; - RegistryValueIterator url_list(config_key.Handle(), url_list_name); + base::win::RegistryValueIterator url_list(config_key.Handle(), url_list_name); while (!match_found && url_list.Valid()) { if (MatchPattern(url, url_list.Name())) { match_found = true; @@ -1518,7 +1520,7 @@ void WaitWithMessageLoop(HANDLE* handles, int count, DWORD timeout) { void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, std::vector<std::wstring>* values) { DCHECK(values); - RegistryValueIterator url_list(parent_key, sub_key_name); + base::win::RegistryValueIterator url_list(parent_key, sub_key_name); while (url_list.Valid()) { values->push_back(url_list.Value()); ++url_list; |