OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/base/sdch_net_log_params.h" |
| 6 |
| 7 #include "base/values.h" |
| 8 #include "net/base/net_errors.h" |
| 9 |
| 10 namespace net { |
| 11 |
| 12 base::Value* NetLogSdchResourceProblemCallback( |
| 13 SdchManager::ProblemCodes problem, |
| 14 bool is_error, |
| 15 NetLog::LogLevel log_level) { |
| 16 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 17 dict->SetInteger("sdch_problem_code", problem); |
| 18 if (is_error) |
| 19 dict->SetInteger("net_error", ERR_SDCH_PROBLEM); |
| 20 return dict; |
| 21 } |
| 22 |
| 23 base::Value* NetLogSdchDictionaryFetchProblemCallback( |
| 24 SdchManager::ProblemCodes problem, |
| 25 const GURL* url, |
| 26 bool is_error, |
| 27 NetLog::LogLevel log_level) { |
| 28 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 29 dict->SetInteger("sdch_problem_code", problem); |
| 30 dict->SetString("dictionary_url", url->spec()); |
| 31 if (is_error) |
| 32 dict->SetInteger("net_error", ERR_SDCH_PROBLEM); |
| 33 return dict; |
| 34 } |
| 35 |
| 36 } // namespace net |
OLD | NEW |