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

Side by Side Diff: net/spdy/spdy_stream.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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/spdy/spdy_session.cc ('k') | net/ssl/openssl_ssl_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "net/spdy/spdy_buffer_producer.h" 15 #include "net/spdy/spdy_buffer_producer.h"
16 #include "net/spdy/spdy_http_utils.h" 16 #include "net/spdy/spdy_http_utils.h"
17 #include "net/spdy/spdy_session.h" 17 #include "net/spdy/spdy_session.h"
18 18
19 namespace net { 19 namespace net {
20 20
21 namespace { 21 namespace {
22 22
23 base::Value* NetLogSpdyStreamErrorCallback(SpdyStreamId stream_id, 23 base::Value* NetLogSpdyStreamErrorCallback(
24 int status, 24 SpdyStreamId stream_id,
25 const std::string* description, 25 int status,
26 NetLog::LogLevel /* log_level */) { 26 const std::string* description,
27 NetLogCaptureMode /* capture_mode */) {
27 base::DictionaryValue* dict = new base::DictionaryValue(); 28 base::DictionaryValue* dict = new base::DictionaryValue();
28 dict->SetInteger("stream_id", static_cast<int>(stream_id)); 29 dict->SetInteger("stream_id", static_cast<int>(stream_id));
29 dict->SetInteger("status", status); 30 dict->SetInteger("status", status);
30 dict->SetString("description", *description); 31 dict->SetString("description", *description);
31 return dict; 32 return dict;
32 } 33 }
33 34
34 base::Value* NetLogSpdyStreamWindowUpdateCallback( 35 base::Value* NetLogSpdyStreamWindowUpdateCallback(
35 SpdyStreamId stream_id, 36 SpdyStreamId stream_id,
36 int32 delta, 37 int32 delta,
37 int32 window_size, 38 int32 window_size,
38 NetLog::LogLevel /* log_level */) { 39 NetLogCaptureMode /* capture_mode */) {
39 base::DictionaryValue* dict = new base::DictionaryValue(); 40 base::DictionaryValue* dict = new base::DictionaryValue();
40 dict->SetInteger("stream_id", stream_id); 41 dict->SetInteger("stream_id", stream_id);
41 dict->SetInteger("delta", delta); 42 dict->SetInteger("delta", delta);
42 dict->SetInteger("window_size", window_size); 43 dict->SetInteger("window_size", window_size);
43 return dict; 44 return dict;
44 } 45 }
45 46
46 bool ContainsUppercaseAscii(const std::string& str) { 47 bool ContainsUppercaseAscii(const std::string& str) {
47 for (std::string::const_iterator i(str.begin()); i != str.end(); ++i) { 48 for (std::string::const_iterator i(str.begin()); i != str.end(); ++i) {
48 if (*i >= 'A' && *i <= 'Z') { 49 if (*i >= 'A' && *i <= 'Z') {
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 920 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
920 state); 921 state);
921 break; 922 break;
922 } 923 }
923 return description; 924 return description;
924 } 925 }
925 926
926 #undef STATE_CASE 927 #undef STATE_CASE
927 928
928 } // namespace net 929 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/ssl/openssl_ssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698