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

Side by Side Diff: net/http/http_cache_transaction.cc

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed Created 5 years, 7 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/ftp/ftp_ctrl_response_buffer.cc ('k') | net/http/http_network_session.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_cache_transaction.h" 5 #include "net/http/http_cache_transaction.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 void RecordNoStoreHeaderHistogram(int load_flags, 176 void RecordNoStoreHeaderHistogram(int load_flags,
177 const HttpResponseInfo* response) { 177 const HttpResponseInfo* response) {
178 if (load_flags & LOAD_MAIN_FRAME) { 178 if (load_flags & LOAD_MAIN_FRAME) {
179 UMA_HISTOGRAM_BOOLEAN( 179 UMA_HISTOGRAM_BOOLEAN(
180 "Net.MainFrameNoStore", 180 "Net.MainFrameNoStore",
181 response->headers->HasHeaderValue("cache-control", "no-store")); 181 response->headers->HasHeaderValue("cache-control", "no-store"));
182 } 182 }
183 } 183 }
184 184
185 base::Value* NetLogAsyncRevalidationInfoCallback( 185 scoped_ptr<base::Value> NetLogAsyncRevalidationInfoCallback(
186 const NetLog::Source& source, 186 const NetLog::Source& source,
187 const HttpRequestInfo* request, 187 const HttpRequestInfo* request,
188 NetLogCaptureMode capture_mode) { 188 NetLogCaptureMode capture_mode) {
189 base::DictionaryValue* dict = new base::DictionaryValue(); 189 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
190 source.AddToEventParameters(dict); 190 source.AddToEventParameters(dict.get());
191 191
192 dict->SetString("url", request->url.possibly_invalid_spec()); 192 dict->SetString("url", request->url.possibly_invalid_spec());
193 dict->SetString("method", request->method); 193 dict->SetString("method", request->method);
194 return dict; 194 return dict.Pass();
195 } 195 }
196 196
197 enum ExternallyConditionalizedType { 197 enum ExternallyConditionalizedType {
198 EXTERNALLY_CONDITIONALIZED_CACHE_REQUIRES_VALIDATION, 198 EXTERNALLY_CONDITIONALIZED_CACHE_REQUIRES_VALIDATION,
199 EXTERNALLY_CONDITIONALIZED_CACHE_USABLE, 199 EXTERNALLY_CONDITIONALIZED_CACHE_USABLE,
200 EXTERNALLY_CONDITIONALIZED_MISMATCHED_VALIDATORS, 200 EXTERNALLY_CONDITIONALIZED_MISMATCHED_VALIDATORS,
201 EXTERNALLY_CONDITIONALIZED_MAX 201 EXTERNALLY_CONDITIONALIZED_MAX
202 }; 202 };
203 203
204 } // namespace 204 } // namespace
(...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after
2978 default: 2978 default:
2979 NOTREACHED(); 2979 NOTREACHED();
2980 } 2980 }
2981 } 2981 }
2982 2982
2983 void HttpCache::Transaction::OnIOComplete(int result) { 2983 void HttpCache::Transaction::OnIOComplete(int result) {
2984 DoLoop(result); 2984 DoLoop(result);
2985 } 2985 }
2986 2986
2987 } // namespace net 2987 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_ctrl_response_buffer.cc ('k') | net/http/http_network_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698