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

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

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 4 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
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 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
6 #define CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // false if there is no such parameter, or if it is not a int. 88 // false if there is no such parameter, or if it is not a int.
89 bool GetIntegerParameter(const std::string& key, int* out) const; 89 bool GetIntegerParameter(const std::string& key, int* out) const;
90 90
91 // Provides the command parameter with the given |key| as a double. Returns 91 // Provides the command parameter with the given |key| as a double. Returns
92 // false if there is no such parameter, or if it is not a dobule. 92 // false if there is no such parameter, or if it is not a dobule.
93 bool GetDoubleParameter(const std::string& key, double* out) const; 93 bool GetDoubleParameter(const std::string& key, double* out) const;
94 94
95 // Provides the command parameter with the given |key| as a Dictionary. 95 // Provides the command parameter with the given |key| as a Dictionary.
96 // Returns false if there is no such parameter, or if it is not a Dictionary. 96 // Returns false if there is no such parameter, or if it is not a Dictionary.
97 bool GetDictionaryParameter(const std::string& key, 97 bool GetDictionaryParameter(const std::string& key,
98 DictionaryValue** out) const; 98 const DictionaryValue** out) const;
99 99
100 // Provides the command parameter with the given |key| as a list. Returns 100 // Provides the command parameter with the given |key| as a list. Returns
101 // false if there is no such parameter, or if it is not a list. 101 // false if there is no such parameter, or if it is not a list.
102 bool GetListParameter(const std::string& key, ListValue** out) const; 102 bool GetListParameter(const std::string& key, const ListValue** out) const;
103 103
104 const std::vector<std::string> path_segments_; 104 const std::vector<std::string> path_segments_;
105 const scoped_ptr<const DictionaryValue> parameters_; 105 const scoped_ptr<const DictionaryValue> parameters_;
106 106
107 private: 107 private:
108 #if defined(OS_MACOSX) 108 #if defined(OS_MACOSX)
109 // An autorelease pool must exist on any thread where Objective C is used, 109 // An autorelease pool must exist on any thread where Objective C is used,
110 // even implicitly. Otherwise the warning: 110 // even implicitly. Otherwise the warning:
111 // "Objects autoreleased with no pool in place." 111 // "Objects autoreleased with no pool in place."
112 // is printed for every object deallocated. Since every incoming command to 112 // is printed for every object deallocated. Since every incoming command to
113 // chrome driver is allocated a new thread, the release pool is declared here. 113 // chrome driver is allocated a new thread, the release pool is declared here.
114 base::mac::ScopedNSAutoreleasePool autorelease_pool; 114 base::mac::ScopedNSAutoreleasePool autorelease_pool;
115 #endif 115 #endif
116 116
117 DISALLOW_COPY_AND_ASSIGN(Command); 117 DISALLOW_COPY_AND_ASSIGN(Command);
118 }; 118 };
119 119
120 } // namespace webdriver 120 } // namespace webdriver
121 121
122 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 122 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_json_requests.cc ('k') | chrome/test/webdriver/commands/command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698