diff options
author | ki.stfu <ki.stfu@gmail.com> | 2015-09-21 17:56:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-22 00:57:25 +0000 |
commit | d3709b5f91fe5d0d4accd7386da5a61743824b9e (patch) | |
tree | ffd618fc74a2588a96fc42be809f0dbf5ee0a93f /chromeos/tools | |
parent | 15b28d658c5a66655c19a7299f2e50fcd7b591c3 (diff) | |
download | chromium_src-d3709b5f91fe5d0d4accd7386da5a61743824b9e.zip chromium_src-d3709b5f91fe5d0d4accd7386da5a61743824b9e.tar.gz chromium_src-d3709b5f91fe5d0d4accd7386da5a61743824b9e.tar.bz2 |
Cleanup: Pass std::string as const reference from chromeos/
Passing std::string by reference can prevent extra copying of object.
BUG=367418
TEST=
R=zelidrag@chromium.org,derat@chromium.org,gauravsh@chromium.org
Review URL: https://codereview.chromium.org/1353323002
Cr-Commit-Position: refs/heads/master@{#350078}
Diffstat (limited to 'chromeos/tools')
-rw-r--r-- | chromeos/tools/onc_validator/onc_validator.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc index 84a9220..14ed891 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: |