OLD | NEW |
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 <utility> |
| 8 |
7 #include "base/values.h" | 9 #include "base/values.h" |
8 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
9 #include "url/gurl.h" | 11 #include "url/gurl.h" |
10 | 12 |
11 namespace net { | 13 namespace net { |
12 | 14 |
13 scoped_ptr<base::Value> NetLogSdchResourceProblemCallback( | 15 scoped_ptr<base::Value> NetLogSdchResourceProblemCallback( |
14 SdchProblemCode problem, | 16 SdchProblemCode problem, |
15 NetLogCaptureMode capture_mode) { | 17 NetLogCaptureMode capture_mode) { |
16 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 18 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
17 dict->SetInteger("sdch_problem_code", problem); | 19 dict->SetInteger("sdch_problem_code", problem); |
18 dict->SetInteger("net_error", ERR_FAILED); | 20 dict->SetInteger("net_error", ERR_FAILED); |
19 return dict.Pass(); | 21 return std::move(dict); |
20 } | 22 } |
21 | 23 |
22 scoped_ptr<base::Value> NetLogSdchDictionaryFetchProblemCallback( | 24 scoped_ptr<base::Value> NetLogSdchDictionaryFetchProblemCallback( |
23 SdchProblemCode problem, | 25 SdchProblemCode problem, |
24 const GURL& url, | 26 const GURL& url, |
25 bool is_error, | 27 bool is_error, |
26 NetLogCaptureMode capture_mode) { | 28 NetLogCaptureMode capture_mode) { |
27 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 29 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
28 dict->SetInteger("sdch_problem_code", problem); | 30 dict->SetInteger("sdch_problem_code", problem); |
29 dict->SetString("dictionary_url", url.spec()); | 31 dict->SetString("dictionary_url", url.spec()); |
30 if (is_error) | 32 if (is_error) |
31 dict->SetInteger("net_error", ERR_FAILED); | 33 dict->SetInteger("net_error", ERR_FAILED); |
32 return dict.Pass(); | 34 return std::move(dict); |
33 } | 35 } |
34 | 36 |
35 } // namespace net | 37 } // namespace net |
OLD | NEW |