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

Side by Side Diff: chrome/test/webdriver/commands/command.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
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 "chrome/test/webdriver/commands/command.h" 5 #include "chrome/test/webdriver/commands/command.h"
6 6
7 namespace webdriver { 7 namespace webdriver {
8 8
9 Command::Command(const std::vector<std::string>& path_segments, 9 Command::Command(const std::vector<std::string>& path_segments,
10 const DictionaryValue* const parameters) 10 const DictionaryValue* const parameters)
(...skipping 14 matching lines...) Expand all
25 return false; 25 return false;
26 } 26 }
27 27
28 bool Command::Init(Response* const response) { 28 bool Command::Init(Response* const response) {
29 return true; 29 return true;
30 } 30 }
31 31
32 void Command::Finish(Response* const response) {} 32 void Command::Finish(Response* const response) {}
33 33
34 std::string Command::GetPathVariable(const size_t i) const { 34 std::string Command::GetPathVariable(const size_t i) const {
35 return i < path_segments_.size() ? path_segments_.at(i) : ""; 35 return i < path_segments_.size() ? path_segments_.at(i) : std::string();
36 } 36 }
37 37
38 bool Command::HasParameter(const std::string& key) const { 38 bool Command::HasParameter(const std::string& key) const {
39 return parameters_.get() && parameters_->HasKey(key); 39 return parameters_.get() && parameters_->HasKey(key);
40 } 40 }
41 41
42 bool Command::IsNullParameter(const std::string& key) const { 42 bool Command::IsNullParameter(const std::string& key) const {
43 const Value* value; 43 const Value* value;
44 return parameters_.get() && 44 return parameters_.get() &&
45 parameters_->Get(key, &value) && 45 parameters_->Get(key, &value) &&
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const DictionaryValue** out) const { 79 const DictionaryValue** out) const {
80 return parameters_.get() != NULL && parameters_->GetDictionary(key, out); 80 return parameters_.get() != NULL && parameters_->GetDictionary(key, out);
81 } 81 }
82 82
83 bool Command::GetListParameter(const std::string& key, 83 bool Command::GetListParameter(const std::string& key,
84 const ListValue** out) const { 84 const ListValue** out) const {
85 return parameters_.get() != NULL && parameters_->GetList(key, out); 85 return parameters_.get() != NULL && parameters_->GetList(key, out);
86 } 86 }
87 87
88 } // namespace webdriver 88 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/ui/ui_test.cc ('k') | chrome/test/webdriver/commands/set_timeout_commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698