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

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

Issue 825473002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « chromeos/system/statistics_provider.cc ('k') | no next file » | 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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (!value->GetAsDictionary(&dict)) { 100 if (!value->GetAsDictionary(&dict)) {
101 LOG(ERROR) << "File '" << filename 101 LOG(ERROR) << "File '" << filename
102 << "' does not contain a dictionary as expected, but type " 102 << "' does not contain a dictionary as expected, but type "
103 << value->GetType(); 103 << value->GetType();
104 } 104 }
105 105
106 return make_scoped_ptr(dict); 106 return make_scoped_ptr(dict);
107 } 107 }
108 108
109 int main(int argc, const char* argv[]) { 109 int main(int argc, const char* argv[]) {
110 CommandLine::Init(argc, argv); 110 base::CommandLine::Init(argc, argv);
111 111
112 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 112 const base::CommandLine& command_line =
113 CommandLine::StringVector args = command_line.GetArgs(); 113 *base::CommandLine::ForCurrentProcess();
114 base::CommandLine::StringVector args = command_line.GetArgs();
114 if (args.size() != 2) { 115 if (args.size() != 2) {
115 PrintHelp(); 116 PrintHelp();
116 return kStatusArgumentError; 117 return kStatusArgumentError;
117 } 118 }
118 119
119 scoped_ptr<base::DictionaryValue> onc_object = ReadDictionary(args[1]); 120 scoped_ptr<base::DictionaryValue> onc_object = ReadDictionary(args[1]);
120 121
121 if (!onc_object) 122 if (!onc_object)
122 return kStatusJsonError; 123 return kStatusJsonError;
123 124
(...skipping 30 matching lines...) Expand all
154 case chromeos::onc::Validator::VALID: 155 case chromeos::onc::Validator::VALID:
155 return kStatusValid; 156 return kStatusValid;
156 case chromeos::onc::Validator::VALID_WITH_WARNINGS: 157 case chromeos::onc::Validator::VALID_WITH_WARNINGS:
157 return kStatusWarnings; 158 return kStatusWarnings;
158 case chromeos::onc::Validator::INVALID: 159 case chromeos::onc::Validator::INVALID:
159 return kStatusInvalid; 160 return kStatusInvalid;
160 default: 161 default:
161 CHECK(false); 162 CHECK(false);
162 } 163 }
163 } 164 }
OLDNEW
« no previous file with comments | « chromeos/system/statistics_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698