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

Side by Side Diff: chrome/browser/configuration_policy_provider_win.cc

Issue 3023037: Remove Value/StringValue's ...UTF16() methods in favour of overloading. (Closed)
Patch Set: I'm an idiot. Created 10 years, 4 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
« no previous file with comments | « chrome/browser/configuration_policy_pref_store.cc ('k') | chrome/browser/dom_ui/history2_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/configuration_policy_provider_win.h" 5 #include "chrome/browser/configuration_policy_provider_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/registry.h" 10 #include "base/registry.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 current != mapping->end(); ++current) { 97 current != mapping->end(); ++current) {
98 std::wstring name = UTF8ToWide(current->name); 98 std::wstring name = UTF8ToWide(current->name);
99 std::wstring string_value; 99 std::wstring string_value;
100 uint32 int_value; 100 uint32 int_value;
101 bool bool_value; 101 bool bool_value;
102 switch (current->value_type) { 102 switch (current->value_type) {
103 case Value::TYPE_STRING: 103 case Value::TYPE_STRING:
104 if (GetRegistryPolicyString(name.c_str(), &string_value)) { 104 if (GetRegistryPolicyString(name.c_str(), &string_value)) {
105 store->Apply( 105 store->Apply(
106 current->policy_type, 106 current->policy_type,
107 Value::CreateStringValueFromUTF16(string_value)); 107 Value::CreateStringValue(string_value));
108 } 108 }
109 break; 109 break;
110 case Value::TYPE_BOOLEAN: 110 case Value::TYPE_BOOLEAN:
111 if (GetRegistryPolicyBoolean(name.c_str(), &bool_value)) { 111 if (GetRegistryPolicyBoolean(name.c_str(), &bool_value)) {
112 store->Apply(current->policy_type, 112 store->Apply(current->policy_type,
113 Value::CreateBooleanValue(bool_value)); 113 Value::CreateBooleanValue(bool_value));
114 } 114 }
115 break; 115 break;
116 case Value::TYPE_INTEGER: 116 case Value::TYPE_INTEGER:
117 if (GetRegistryPolicyInteger(name.c_str(), &int_value)) { 117 if (GetRegistryPolicyInteger(name.c_str(), &int_value)) {
118 store->Apply(current->policy_type, 118 store->Apply(current->policy_type,
119 Value::CreateIntegerValue(int_value)); 119 Value::CreateIntegerValue(int_value));
120 } 120 }
121 break; 121 break;
122 default: 122 default:
123 NOTREACHED(); 123 NOTREACHED();
124 return false; 124 return false;
125 } 125 }
126 } 126 }
127 127
128 return true; 128 return true;
129 } 129 }
OLDNEW
« no previous file with comments | « chrome/browser/configuration_policy_pref_store.cc ('k') | chrome/browser/dom_ui/history2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698