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

Side by Side Diff: chromeos/network/onc/onc_validator.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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 "chromeos/network/onc/onc_validator.h" 5 #include "chromeos/network/onc/onc_validator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 return !error_on_missing_field_ || all_required_exist; 319 return !error_on_missing_field_ || all_required_exist;
320 } 320 }
321 321
322 namespace { 322 namespace {
323 323
324 std::string JoinStringRange(const std::vector<const char*>& strings, 324 std::string JoinStringRange(const std::vector<const char*>& strings,
325 const std::string& separator) { 325 const std::string& separator) {
326 std::vector<std::string> string_vector; 326 std::vector<std::string> string_vector;
327 std::copy(strings.begin(), strings.end(), std::back_inserter(string_vector)); 327 std::copy(strings.begin(), strings.end(), std::back_inserter(string_vector));
328 return JoinString(string_vector, separator); 328 return base::JoinString(string_vector, separator);
329 } 329 }
330 330
331 } // namespace 331 } // namespace
332 332
333 bool Validator::FieldExistsAndHasNoValidValue( 333 bool Validator::FieldExistsAndHasNoValidValue(
334 const base::DictionaryValue& object, 334 const base::DictionaryValue& object,
335 const std::string& field_name, 335 const std::string& field_name,
336 const std::vector<const char*>& valid_values) { 336 const std::vector<const char*>& valid_values) {
337 std::string actual_value; 337 std::string actual_value;
338 if (!object.GetStringWithoutPathExpansion(field_name, &actual_value)) 338 if (!object.GetStringWithoutPathExpansion(field_name, &actual_value))
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 if (type == kClient) 945 if (type == kClient)
946 all_required_exist &= RequireField(*result, kPKCS12); 946 all_required_exist &= RequireField(*result, kPKCS12);
947 else if (type == kServer || type == kAuthority) 947 else if (type == kServer || type == kAuthority)
948 all_required_exist &= RequireField(*result, kX509); 948 all_required_exist &= RequireField(*result, kX509);
949 } 949 }
950 950
951 return !error_on_missing_field_ || all_required_exist; 951 return !error_on_missing_field_ || all_required_exist;
952 } 952 }
953 953
954 std::string Validator::MessageHeader() { 954 std::string Validator::MessageHeader() {
955 std::string path = path_.empty() ? "toplevel" : JoinString(path_, "."); 955 std::string path = path_.empty() ? "toplevel" : base::JoinString(path_, ".");
956 std::string message = "At " + path + ": "; 956 std::string message = "At " + path + ": ";
957 return message; 957 return message;
958 } 958 }
959 959
960 } // namespace onc 960 } // namespace onc
961 } // namespace chromeos 961 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_change_notifier_chromeos.cc ('k') | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698