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

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

Issue 423813002: Sdch view for net-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adopt logging for URLReqest-based dict fetcher + cosmetics Created 6 years, 3 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
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698