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

Side by Side Diff: chrome/browser/chromeos/cros/certificate_pattern.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/cros/certificate_pattern.h" 5 #include "chrome/browser/chromeos/cros/certificate_pattern.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 if (!subject_.Empty()) 310 if (!subject_.Empty())
311 dict->Set(kSubjectKey, subject_.CreateAsDictionary()); 311 dict->Set(kSubjectKey, subject_.CreateAsDictionary());
312 312
313 if (!enrollment_uri_list_.empty()) 313 if (!enrollment_uri_list_.empty())
314 dict->Set(kEnrollmentUriKey, CreateListFromStrings(enrollment_uri_list_)); 314 dict->Set(kEnrollmentUriKey, CreateListFromStrings(enrollment_uri_list_));
315 return dict; 315 return dict;
316 } 316 }
317 317
318 bool CertificatePattern::CopyFromDictionary(const DictionaryValue &dict) { 318 bool CertificatePattern::CopyFromDictionary(const DictionaryValue &dict) {
319 DictionaryValue* child_dict = NULL; 319 const DictionaryValue* child_dict = NULL;
320 ListValue* child_list = NULL; 320 const ListValue* child_list = NULL;
321 Clear(); 321 Clear();
322 322
323 // All of these are optional. 323 // All of these are optional.
324 if (dict.GetList(kIssuerCaRefKey, &child_list) && child_list) { 324 if (dict.GetList(kIssuerCaRefKey, &child_list) && child_list) {
325 if (!GetAsListOfStrings(*child_list, &issuer_ca_ref_list_)) 325 if (!GetAsListOfStrings(*child_list, &issuer_ca_ref_list_))
326 return false; 326 return false;
327 } 327 }
328 if (dict.GetDictionary(kIssuerKey, &child_dict) && child_dict) { 328 if (dict.GetDictionary(kIssuerKey, &child_dict) && child_dict) {
329 if (!issuer_.CopyFromDictionary(*child_dict)) 329 if (!issuer_.CopyFromDictionary(*child_dict))
330 return false; 330 return false;
(...skipping 12 matching lines...) Expand all
343 // If we didn't copy anything from the dictionary, then it had better be 343 // If we didn't copy anything from the dictionary, then it had better be
344 // empty. 344 // empty.
345 DCHECK(dict.empty() == Empty()); 345 DCHECK(dict.empty() == Empty());
346 if (dict.empty() != Empty()) 346 if (dict.empty() != Empty())
347 return false; 347 return false;
348 348
349 return true; 349 return true;
350 } 350 }
351 351
352 } // namespace chromeos 352 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_html_writer.cc ('k') | chrome/browser/chromeos/cros/native_network_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698