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

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

Issue 17034006: Add base namespace to more values in sync and elsewhere. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_merger.cc ('k') | chromeos/network/shill_property_handler.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) 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 #include <string> 8 #include <string>
9 9
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 10 matching lines...) Expand all
21 namespace { 21 namespace {
22 22
23 std::string ValueToString(const base::Value& value) { 23 std::string ValueToString(const base::Value& value) {
24 std::string json; 24 std::string json;
25 base::JSONWriter::Write(&value, &json); 25 base::JSONWriter::Write(&value, &json);
26 return json; 26 return json;
27 } 27 }
28 28
29 // Copied from policy/configuration_policy_handler.cc. 29 // Copied from policy/configuration_policy_handler.cc.
30 // TODO(pneubeck): move to a common place like base/. 30 // TODO(pneubeck): move to a common place like base/.
31 std::string ValueTypeToString(Value::Type type) { 31 std::string ValueTypeToString(base::Value::Type type) {
32 static const char* strings[] = { 32 static const char* strings[] = {
33 "null", 33 "null",
34 "boolean", 34 "boolean",
35 "integer", 35 "integer",
36 "double", 36 "double",
37 "string", 37 "string",
38 "binary", 38 "binary",
39 "dictionary", 39 "dictionary",
40 "list" 40 "list"
41 }; 41 };
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 } 777 }
778 778
779 std::string Validator::MessageHeader() { 779 std::string Validator::MessageHeader() {
780 std::string path = path_.empty() ? "toplevel" : JoinString(path_, "."); 780 std::string path = path_.empty() ? "toplevel" : JoinString(path_, ".");
781 std::string message = "At " + path + ": "; 781 std::string message = "At " + path + ": ";
782 return message; 782 return message;
783 } 783 }
784 784
785 } // namespace onc 785 } // namespace onc
786 } // namespace chromeos 786 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_merger.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698