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

Side by Side Diff: chrome_frame/policy_settings.cc

Issue 3836005: Move pe_image and registry from base to base/win and use the namespace. It re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome_frame/policy_settings.h" 5 #include "chrome_frame/policy_settings.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/registry.h"
9 #include "base/string_util.h" 8 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/win/registry.h"
11 #include "chrome/common/policy_constants.h" 11 #include "chrome/common/policy_constants.h"
12 #include "chrome_frame/utils.h" 12 #include "chrome_frame/utils.h"
13 13
14 PolicySettings::RendererForUrl PolicySettings::GetRendererForUrl( 14 PolicySettings::RendererForUrl PolicySettings::GetRendererForUrl(
15 const wchar_t* url) { 15 const wchar_t* url) {
16 RendererForUrl renderer = default_renderer_; 16 RendererForUrl renderer = default_renderer_;
17 std::vector<std::wstring>::const_iterator it; 17 std::vector<std::wstring>::const_iterator it;
18 for (it = renderer_exclusion_list_.begin(); 18 for (it = renderer_exclusion_list_.begin();
19 it != renderer_exclusion_list_.end(); ++it) { 19 it != renderer_exclusion_list_.end(); ++it) {
20 if (MatchPattern(url, (*it))) { 20 if (MatchPattern(url, (*it))) {
(...skipping 17 matching lines...) Expand all
38 break; 38 break;
39 } 39 }
40 } 40 }
41 return renderer; 41 return renderer;
42 } 42 }
43 43
44 void PolicySettings::RefreshFromRegistry() { 44 void PolicySettings::RefreshFromRegistry() {
45 default_renderer_ = RENDERER_NOT_SPECIFIED; 45 default_renderer_ = RENDERER_NOT_SPECIFIED;
46 renderer_exclusion_list_.clear(); 46 renderer_exclusion_list_.clear();
47 47
48 RegKey config_key; 48 base::win::RegKey config_key;
49 DWORD value = RENDERER_NOT_SPECIFIED; 49 DWORD value = RENDERER_NOT_SPECIFIED;
50 HKEY root_key[] = { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER }; 50 HKEY root_key[] = { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER };
51 std::wstring settings_value( 51 std::wstring settings_value(
52 ASCIIToWide(policy::key::kChromeFrameRendererSettings)); 52 ASCIIToWide(policy::key::kChromeFrameRendererSettings));
53 for (int i = 0; i < arraysize(root_key); ++i) { 53 for (int i = 0; i < arraysize(root_key); ++i) {
54 if (config_key.Open(root_key[i], policy::kRegistrySubKey, KEY_READ) && 54 if (config_key.Open(root_key[i], policy::kRegistrySubKey, KEY_READ) &&
55 config_key.ReadValueDW(settings_value.c_str(), &value)) { 55 config_key.ReadValueDW(settings_value.c_str(), &value)) {
56 break; 56 break;
57 } else { 57 } else {
58 config_key.Close(); 58 config_key.Close();
(...skipping 24 matching lines...) Expand all
83 std::wstring sub_key(policy::kRegistrySubKey); 83 std::wstring sub_key(policy::kRegistrySubKey);
84 sub_key += L"\\"; 84 sub_key += L"\\";
85 sub_key += ASCIIToWide(policy::key::kChromeFrameContentTypes); 85 sub_key += ASCIIToWide(policy::key::kChromeFrameContentTypes);
86 86
87 for (int i = 0; i < arraysize(root_key) && content_type_list_.size() == 0; 87 for (int i = 0; i < arraysize(root_key) && content_type_list_.size() == 0;
88 ++i) { 88 ++i) {
89 EnumerateKeyValues(root_key[i], sub_key.c_str(), &content_type_list_); 89 EnumerateKeyValues(root_key[i], sub_key.c_str(), &content_type_list_);
90 } 90 }
91 } 91 }
92 92
OLDNEW
« no previous file with comments | « chrome_frame/crash_reporting/crash_metrics.cc ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698