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

Unified Diff: chrome/test/webdriver/commands/cookie_commands.cc

Issue 21030009: Make element removal methods in DictionaryValue and ListValue take scoped_ptr's as outparams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/automation/automation_json_requests.cc ('k') | chrome/test/webdriver/webdriver_automation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/commands/cookie_commands.cc
diff --git a/chrome/test/webdriver/commands/cookie_commands.cc b/chrome/test/webdriver/commands/cookie_commands.cc
index 927b8a97a1ceda84d9663f715a0552dc8b3a0ab1..cfa268f56d830ddb438ed81e74a9ac2af0651145 100644
--- a/chrome/test/webdriver/commands/cookie_commands.cc
+++ b/chrome/test/webdriver/commands/cookie_commands.cc
@@ -37,14 +37,14 @@ bool CookieCommand::DoesPost() {
void CookieCommand::ExecuteGet(Response* const response) {
std::string url;
Error* error = session_->GetURL(&url);
- ListValue* cookies = NULL;
+ scoped_ptr<ListValue> cookies;
if (!error)
error = session_->GetCookies(url, &cookies);
if (error) {
response->SetError(error);
return;
}
- response->SetValue(cookies);
+ response->SetValue(cookies.release());
}
void CookieCommand::ExecutePost(Response* const response) {
@@ -83,10 +83,9 @@ void CookieCommand::ExecutePost(Response* const response) {
void CookieCommand::ExecuteDelete(Response* const response) {
std::string url;
Error* error = session_->GetURL(&url);
- ListValue* unscoped_cookies = NULL;
+ scoped_ptr<ListValue> cookies;
if (!error)
- error = session_->GetCookies(url, &unscoped_cookies);
- scoped_ptr<ListValue> cookies(unscoped_cookies);
+ error = session_->GetCookies(url, &cookies);
if (error) {
response->SetError(error);
return;
« no previous file with comments | « chrome/test/automation/automation_json_requests.cc ('k') | chrome/test/webdriver/webdriver_automation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698