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

Unified Diff: net/url_request/url_request.cc

Issue 1128083003: Converted bare pointer to scoped_ptr in net/url_request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted the comment desciption. Created 5 years, 7 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 | « net/url_request/url_request.h ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index de525603b5bfea255d7bd6fd976b015efdc34add..9579ebb331e21ea9c7105e7fa05983a042c5c1dc 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -279,8 +279,8 @@ LoadStateWithParam URLRequest::GetLoadState() const {
base::string16());
}
-base::Value* URLRequest::GetStateAsValue() const {
- base::DictionaryValue* dict = new base::DictionaryValue();
+scoped_ptr<base::Value> URLRequest::GetStateAsValue() const {
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("url", original_url().possibly_invalid_spec());
if (url_chain_.size() > 1) {
@@ -323,7 +323,7 @@ base::Value* URLRequest::GetStateAsValue() const {
}
if (status_.error() != OK)
dict->SetInteger("net_error", status_.error());
- return dict;
+ return dict.Pass();
}
void URLRequest::LogBlockedBy(const char* blocked_by) {
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698