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

Side by Side Diff: chromeos/tools/onc_validator/onc_validator.cc

Issue 12282019: Disable "using base::FilePath" on Linux since it now compiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_test_utils.cc ('k') | net/socket/tcp_client_socket.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <cstdio> 5 #include <cstdio>
6 #include <iostream> 6 #include <iostream>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 " %i File couldn't be read or is not a valid JSON dictionary.\n" 76 " %i File couldn't be read or is not a valid JSON dictionary.\n"
77 " %i Some command line arguments are wrong.\n", 77 " %i Some command line arguments are wrong.\n",
78 kStatusValid, 78 kStatusValid,
79 kStatusWarnings, 79 kStatusWarnings,
80 kStatusInvalid, 80 kStatusInvalid,
81 kStatusJsonError, 81 kStatusJsonError,
82 kStatusArgumentError); 82 kStatusArgumentError);
83 } 83 }
84 84
85 scoped_ptr<base::DictionaryValue> ReadDictionary(std::string filename) { 85 scoped_ptr<base::DictionaryValue> ReadDictionary(std::string filename) {
86 FilePath path(filename); 86 base::FilePath path(filename);
87 JSONFileValueSerializer serializer(path); 87 JSONFileValueSerializer serializer(path);
88 serializer.set_allow_trailing_comma(true); 88 serializer.set_allow_trailing_comma(true);
89 89
90 base::DictionaryValue* dict = NULL; 90 base::DictionaryValue* dict = NULL;
91 91
92 std::string json_error; 92 std::string json_error;
93 base::Value* value = serializer.Deserialize(NULL, &json_error); 93 base::Value* value = serializer.Deserialize(NULL, &json_error);
94 if (!value) { 94 if (!value) {
95 LOG(ERROR) << "Couldn't json-deserialize file '" << filename 95 LOG(ERROR) << "Couldn't json-deserialize file '" << filename
96 << "': " << json_error; 96 << "': " << json_error;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 case chromeos::onc::Validator::VALID: 154 case chromeos::onc::Validator::VALID:
155 return kStatusValid; 155 return kStatusValid;
156 case chromeos::onc::Validator::VALID_WITH_WARNINGS: 156 case chromeos::onc::Validator::VALID_WITH_WARNINGS:
157 return kStatusWarnings; 157 return kStatusWarnings;
158 case chromeos::onc::Validator::INVALID: 158 case chromeos::onc::Validator::INVALID:
159 return kStatusInvalid; 159 return kStatusInvalid;
160 default: 160 default:
161 CHECK(false); 161 CHECK(false);
162 } 162 }
163 } 163 }
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_test_utils.cc ('k') | net/socket/tcp_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698