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

Side by Side Diff: net/base/sdch_net_log_params.cc

Issue 1146413002: Converted bare pointers to scoped_ptr in net/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « net/base/sdch_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "net/base/sdch_net_log_params.h" 5 #include "net/base/sdch_net_log_params.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 base::Value* NetLogSdchResourceProblemCallback(SdchProblemCode problem, 13 base::Value* NetLogSdchResourceProblemCallback(SdchProblemCode problem,
14 NetLogCaptureMode capture_mode) { 14 NetLogCaptureMode capture_mode) {
15 base::DictionaryValue* dict = new base::DictionaryValue(); 15 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
eroman 2015/05/21 14:43:22 The changes in this file are also covered by Evan'
16 dict->SetInteger("sdch_problem_code", problem); 16 dict->SetInteger("sdch_problem_code", problem);
17 dict->SetInteger("net_error", ERR_FAILED); 17 dict->SetInteger("net_error", ERR_FAILED);
18 return dict; 18 return dict.release();
19 } 19 }
20 20
21 base::Value* NetLogSdchDictionaryFetchProblemCallback( 21 base::Value* NetLogSdchDictionaryFetchProblemCallback(
22 SdchProblemCode problem, 22 SdchProblemCode problem,
23 const GURL& url, 23 const GURL& url,
24 bool is_error, 24 bool is_error,
25 NetLogCaptureMode capture_mode) { 25 NetLogCaptureMode capture_mode) {
26 base::DictionaryValue* dict = new base::DictionaryValue(); 26 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
27 dict->SetInteger("sdch_problem_code", problem); 27 dict->SetInteger("sdch_problem_code", problem);
28 dict->SetString("dictionary_url", url.spec()); 28 dict->SetString("dictionary_url", url.spec());
29 if (is_error) 29 if (is_error)
30 dict->SetInteger("net_error", ERR_FAILED); 30 dict->SetInteger("net_error", ERR_FAILED);
31 return dict; 31 return dict.release();
32 } 32 }
33 33
34 } // namespace net 34 } // namespace net
OLDNEW
« no previous file with comments | « net/base/sdch_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698