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

Unified Diff: chromeos/tools/onc_validator/onc_validator.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/tools/onc_validator/onc_validator.cc
diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc
index 84a92202c9c40ce8d6f4b435cb6556967de753f3..14ed8919b87b91f13f87985fb4981a0b4ba1ff33 100644
--- a/chromeos/tools/onc_validator/onc_validator.cc
+++ b/chromeos/tools/onc_validator/onc_validator.cc
@@ -82,7 +82,7 @@ void PrintHelp() {
kStatusArgumentError);
}
-scoped_ptr<base::DictionaryValue> ReadDictionary(std::string filename) {
+scoped_ptr<base::DictionaryValue> ReadDictionary(const std::string& filename) {
base::FilePath path(filename);
JSONFileValueDeserializer deserializer(path);
deserializer.set_allow_trailing_comma(true);
@@ -151,7 +151,7 @@ int main(int argc, const char* argv[]) {
chromeos::onc::Validator::Result result;
validator.ValidateAndRepairObject(signature, *onc_object, &result);
- switch(result) {
+ switch (result) {
case chromeos::onc::Validator::VALID:
return kStatusValid;
case chromeos::onc::Validator::VALID_WITH_WARNINGS:

Powered by Google App Engine
This is Rietveld 408576698