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

Side by Side Diff: net/http/http_stream_parser.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
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/proxy/proxy_script_decider.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/http/http_stream_parser.h" 5 #include "net/http/http_stream_parser.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/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // There's at least one |field_name| header. Check if there are any more 49 // There's at least one |field_name| header. Check if there are any more
50 // such headers, and if so, return true if they have different values. 50 // such headers, and if so, return true if they have different values.
51 std::string field_value2; 51 std::string field_value2;
52 while (headers.EnumerateHeader(&it, field_name, &field_value2)) { 52 while (headers.EnumerateHeader(&it, field_name, &field_value2)) {
53 if (field_value != field_value2) 53 if (field_value != field_value2)
54 return true; 54 return true;
55 } 55 }
56 return false; 56 return false;
57 } 57 }
58 58
59 Value* NetLogSendRequestBodyCallback(int length, 59 base::Value* NetLogSendRequestBodyCallback(
60 bool is_chunked, 60 int length,
61 bool did_merge, 61 bool is_chunked,
62 net::NetLog::LogLevel /* log_level */) { 62 bool did_merge,
63 DictionaryValue* dict = new DictionaryValue(); 63 net::NetLog::LogLevel /* log_level */) {
64 base::DictionaryValue* dict = new base::DictionaryValue();
64 dict->SetInteger("length", length); 65 dict->SetInteger("length", length);
65 dict->SetBoolean("is_chunked", is_chunked); 66 dict->SetBoolean("is_chunked", is_chunked);
66 dict->SetBoolean("did_merge", did_merge); 67 dict->SetBoolean("did_merge", did_merge);
67 return dict; 68 return dict;
68 } 69 }
69 70
70 } // namespace 71 } // namespace
71 72
72 namespace net { 73 namespace net {
73 74
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 request_body->IsInMemory() && 946 request_body->IsInMemory() &&
946 request_body->size() > 0) { 947 request_body->size() > 0) {
947 size_t merged_size = request_headers.size() + request_body->size(); 948 size_t merged_size = request_headers.size() + request_body->size();
948 if (merged_size <= kMaxMergedHeaderAndBodySize) 949 if (merged_size <= kMaxMergedHeaderAndBodySize)
949 return true; 950 return true;
950 } 951 }
951 return false; 952 return false;
952 } 953 }
953 954
954 } // namespace net 955 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/proxy/proxy_script_decider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698