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

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

Issue 15662008: Make net and ipc explicitly use the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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_header_block.h" 5 #include "net/spdy/spdy_header_block.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "net/spdy/spdy_http_utils.h" 8 #include "net/spdy/spdy_http_utils.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 Value* SpdyHeaderBlockNetLogCallback( 12 base::Value* SpdyHeaderBlockNetLogCallback(
13 const SpdyHeaderBlock* headers, 13 const SpdyHeaderBlock* headers,
14 NetLog::LogLevel /* log_level */) { 14 NetLog::LogLevel /* log_level */) {
15 DictionaryValue* dict = new DictionaryValue(); 15 base::DictionaryValue* dict = new base::DictionaryValue();
16 DictionaryValue* headers_dict = new DictionaryValue(); 16 base::DictionaryValue* headers_dict = new base::DictionaryValue();
17 for (SpdyHeaderBlock::const_iterator it = headers->begin(); 17 for (SpdyHeaderBlock::const_iterator it = headers->begin();
18 it != headers->end(); ++it) { 18 it != headers->end(); ++it) {
19 headers_dict->SetWithoutPathExpansion( 19 headers_dict->SetWithoutPathExpansion(
20 it->first, 20 it->first,
21 new StringValue( 21 new base::StringValue(
22 ShouldShowHttpHeaderValue(it->first) ? it->second : "[elided]")); 22 ShouldShowHttpHeaderValue(it->first) ? it->second : "[elided]"));
23 } 23 }
24 dict->Set("headers", headers_dict); 24 dict->Set("headers", headers_dict);
25 return dict; 25 return dict;
26 } 26 }
27 27
28 bool SpdyHeaderBlockFromNetLogParam( 28 bool SpdyHeaderBlockFromNetLogParam(
29 const base::Value* event_param, 29 const base::Value* event_param,
30 SpdyHeaderBlock* headers) { 30 SpdyHeaderBlock* headers) {
31 headers->clear(); 31 headers->clear();
(...skipping 11 matching lines...) Expand all
43 it.Advance()) { 43 it.Advance()) {
44 if (!it.value().GetAsString(&(*headers)[it.key()])) { 44 if (!it.value().GetAsString(&(*headers)[it.key()])) {
45 headers->clear(); 45 headers->clear();
46 return false; 46 return false;
47 } 47 }
48 } 48 }
49 return true; 49 return true;
50 } 50 }
51 51
52 } // namespace net 52 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/transport_client_socket_pool.cc ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698