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

Side by Side Diff: chrome/browser/policy/device_management_policy_cache.cc

Issue 5118003: Update dm proto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/policy/proto
Patch Set: s/VALUE_TYPE_INT64_ARRAY_/VALUE_TYPE_INT64_ARRAY/ Created 10 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/policy/device_management_policy_cache_unittest.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/policy/device_management_policy_cache.h" 5 #include "chrome/browser/policy/device_management_policy_cache.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return BinaryValue::CreateWithCopiedBuffer(bytes.c_str(), bytes.size()); 171 return BinaryValue::CreateWithCopiedBuffer(bytes.c_str(), bytes.size());
172 } 172 }
173 return NULL; 173 return NULL;
174 case em::GenericValue::VALUE_TYPE_BOOL_ARRAY: { 174 case em::GenericValue::VALUE_TYPE_BOOL_ARRAY: {
175 ListValue* list = new ListValue; 175 ListValue* list = new ListValue;
176 RepeatedField<bool>::const_iterator i; 176 RepeatedField<bool>::const_iterator i;
177 for (i = value.bool_array().begin(); i != value.bool_array().end(); ++i) 177 for (i = value.bool_array().begin(); i != value.bool_array().end(); ++i)
178 list->Append(Value::CreateBooleanValue(*i)); 178 list->Append(Value::CreateBooleanValue(*i));
179 return list; 179 return list;
180 } 180 }
181 case em::GenericValue::VALUE_TYPE_INT64_ARRAY_: { 181 case em::GenericValue::VALUE_TYPE_INT64_ARRAY: {
182 ListValue* list = new ListValue; 182 ListValue* list = new ListValue;
183 RepeatedField<google::protobuf::int64>::const_iterator i; 183 RepeatedField<google::protobuf::int64>::const_iterator i;
184 for (i = value.int64_array().begin(); 184 for (i = value.int64_array().begin();
185 i != value.int64_array().end(); ++i) { 185 i != value.int64_array().end(); ++i) {
186 Value* int_value = DecodeIntegerValue(*i); 186 Value* int_value = DecodeIntegerValue(*i);
187 if (int_value) 187 if (int_value)
188 list->Append(int_value); 188 list->Append(int_value);
189 } 189 }
190 return list; 190 return list;
191 } 191 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 DeviceManagementPolicyCache::DecodeValue(named_value->value()); 235 DeviceManagementPolicyCache::DecodeValue(named_value->value());
236 if (decoded_value) 236 if (decoded_value)
237 result->Set(named_value->name(), decoded_value); 237 result->Set(named_value->name(), decoded_value);
238 } 238 }
239 } 239 }
240 } 240 }
241 return result; 241 return result;
242 } 242 }
243 243
244 } // namespace policy 244 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/device_management_policy_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698