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

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

Issue 11128003: fix uninitialized variable warning for vs2012 compilation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 8
9 namespace net { 9 namespace net {
10 10
(...skipping 10 matching lines...) Expand all
21 dict->Set("headers", headers_dict); 21 dict->Set("headers", headers_dict);
22 return dict; 22 return dict;
23 } 23 }
24 24
25 bool SpdyHeaderBlockFromNetLogParam( 25 bool SpdyHeaderBlockFromNetLogParam(
26 const base::Value* event_param, 26 const base::Value* event_param,
27 SpdyHeaderBlock* headers) { 27 SpdyHeaderBlock* headers) {
28 headers->clear(); 28 headers->clear();
29 29
30 const base::DictionaryValue* dict; 30 const base::DictionaryValue* dict;
31 const base::DictionaryValue* header_dict; 31 const base::DictionaryValue* header_dict = NULL;
32 32
33 if (!event_param || 33 if (!event_param ||
34 !event_param->GetAsDictionary(&dict) || 34 !event_param->GetAsDictionary(&dict) ||
35 !dict->GetDictionary("headers", &header_dict)) { 35 !dict->GetDictionary("headers", &header_dict)) {
36 return false; 36 return false;
37 } 37 }
38 38
39 for (base::DictionaryValue::key_iterator it = header_dict->begin_keys(); 39 for (base::DictionaryValue::key_iterator it = header_dict->begin_keys();
40 it != header_dict->end_keys(); 40 it != header_dict->end_keys();
41 ++it) { 41 ++it) {
42 std::string value; 42 std::string value;
43 if (!header_dict->GetString(*it, &(*headers)[*it])) { 43 if (!header_dict->GetString(*it, &(*headers)[*it])) {
44 headers->clear(); 44 headers->clear();
45 return false; 45 return false;
46 } 46 }
47 } 47 }
48 return true; 48 return true;
49 } 49 }
50 50
51 } // namespace net 51 } // namespace net
OLDNEW
« net/http/http_request_headers.cc ('K') | « net/http/http_response_headers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698