OLD | NEW |
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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // static | 103 // static |
104 void PolicySettings::ReadContentTypeSetting( | 104 void PolicySettings::ReadContentTypeSetting( |
105 std::vector<std::wstring>* content_type_list) { | 105 std::vector<std::wstring>* content_type_list) { |
106 DCHECK(content_type_list); | 106 DCHECK(content_type_list); |
107 | 107 |
108 std::wstring sub_key(policy::kRegistrySubKey); | 108 std::wstring sub_key(policy::kRegistrySubKey); |
109 sub_key += L"\\"; | 109 sub_key += L"\\"; |
110 sub_key += ASCIIToWide(policy::key::kChromeFrameContentTypes); | 110 sub_key += ASCIIToWide(policy::key::kChromeFrameContentTypes); |
111 | 111 |
112 content_type_list->clear(); | 112 content_type_list->clear(); |
113 for (int i = 0; i < arraysize(kRootKeys) && content_type_list->size() == 0; | 113 for (int i = 0; i < arraysize(kRootKeys) && content_type_list->empty(); |
114 ++i) { | 114 ++i) { |
115 EnumerateKeyValues(kRootKeys[i], sub_key.c_str(), content_type_list); | 115 EnumerateKeyValues(kRootKeys[i], sub_key.c_str(), content_type_list); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 // static | 119 // static |
120 void PolicySettings::ReadApplicationLocaleSetting( | 120 void PolicySettings::ReadApplicationLocaleSetting( |
121 std::wstring* application_locale) { | 121 std::wstring* application_locale) { |
122 DCHECK(application_locale); | 122 DCHECK(application_locale); |
123 | 123 |
(...skipping 29 matching lines...) Expand all Loading... |
153 swap(default_renderer_, default_renderer); | 153 swap(default_renderer_, default_renderer); |
154 swap(renderer_exclusion_list_, renderer_exclusion_list); | 154 swap(renderer_exclusion_list_, renderer_exclusion_list); |
155 swap(content_type_list_, content_type_list); | 155 swap(content_type_list_, content_type_list); |
156 swap(application_locale_, application_locale); | 156 swap(application_locale_, application_locale); |
157 } | 157 } |
158 | 158 |
159 // static | 159 // static |
160 PolicySettings* PolicySettings::GetInstance() { | 160 PolicySettings* PolicySettings::GetInstance() { |
161 return Singleton<PolicySettings>::get(); | 161 return Singleton<PolicySettings>::get(); |
162 } | 162 } |
OLD | NEW |