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

Side by Side Diff: net/disk_cache/net_log_parameters.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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/disk_cache/net_log_parameters.h" 5 #include "net/disk_cache/net_log_parameters.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return dict; 73 return dict;
74 } 74 }
75 75
76 base::Value* NetLogGetAvailableRangeResultCallback( 76 base::Value* NetLogGetAvailableRangeResultCallback(
77 int64 start, 77 int64 start,
78 int result, 78 int result,
79 net::NetLog::LogLevel /* log_level */) { 79 net::NetLog::LogLevel /* log_level */) {
80 base::DictionaryValue* dict = new base::DictionaryValue(); 80 base::DictionaryValue* dict = new base::DictionaryValue();
81 if (result > 0) { 81 if (result > 0) {
82 dict->SetInteger("length", result); 82 dict->SetInteger("length", result);
83 dict->SetString("start", base::Int64ToString(start)); 83 dict->SetString("start", base::Int64ToString(start));
84 } else { 84 } else {
85 dict->SetInteger("net_error", result); 85 dict->SetInteger("net_error", result);
86 } 86 }
87 return dict; 87 return dict;
88 } 88 }
89 89
90 } // namespace 90 } // namespace
91 91
92 namespace disk_cache { 92 namespace disk_cache {
93 93
94 net::NetLog::ParametersCallback CreateNetLogEntryCreationCallback( 94 net::NetLog::ParametersCallback CreateNetLogEntryCreationCallback(
95 const Entry* entry, 95 const Entry* entry,
96 bool created) { 96 bool created) {
97 DCHECK(entry); 97 DCHECK(entry);
98 return base::Bind(&NetLogEntryCreationCallback, entry, created); 98 return base::Bind(&NetLogEntryCreationCallback, entry, created);
99 } 99 }
100 100
101 net::NetLog::ParametersCallback CreateNetLogReadWriteDataCallback( 101 net::NetLog::ParametersCallback CreateNetLogReadWriteDataCallback(
102 int index, 102 int index,
103 int offset, 103 int offset,
104 int buf_len, 104 int buf_len,
105 bool truncate) { 105 bool truncate) {
106 return base::Bind(&NetLogReadWriteDataCallback, 106 return base::Bind(
107 index, offset, buf_len, truncate); 107 &NetLogReadWriteDataCallback, index, offset, buf_len, truncate);
108 } 108 }
109 109
110 net::NetLog::ParametersCallback CreateNetLogReadWriteCompleteCallback( 110 net::NetLog::ParametersCallback CreateNetLogReadWriteCompleteCallback(
111 int bytes_copied) { 111 int bytes_copied) {
112 return base::Bind(&NetLogReadWriteCompleteCallback, bytes_copied); 112 return base::Bind(&NetLogReadWriteCompleteCallback, bytes_copied);
113 } 113 }
114 114
115 net::NetLog::ParametersCallback CreateNetLogSparseOperationCallback( 115 net::NetLog::ParametersCallback CreateNetLogSparseOperationCallback(
116 int64 offset, 116 int64 offset,
117 int buff_len) { 117 int buff_len) {
118 return base::Bind(&NetLogSparseOperationCallback, offset, buff_len); 118 return base::Bind(&NetLogSparseOperationCallback, offset, buff_len);
119 } 119 }
120 120
121 net::NetLog::ParametersCallback CreateNetLogSparseReadWriteCallback( 121 net::NetLog::ParametersCallback CreateNetLogSparseReadWriteCallback(
122 const net::NetLog::Source& source, 122 const net::NetLog::Source& source,
123 int child_len) { 123 int child_len) {
124 return base::Bind(&NetLogSparseReadWriteCallback, source, child_len); 124 return base::Bind(&NetLogSparseReadWriteCallback, source, child_len);
125 } 125 }
126 126
127 net::NetLog::ParametersCallback CreateNetLogGetAvailableRangeResultCallback( 127 net::NetLog::ParametersCallback CreateNetLogGetAvailableRangeResultCallback(
128 int64 start, 128 int64 start,
129 int result) { 129 int result) {
130 return base::Bind(&NetLogGetAvailableRangeResultCallback, start, result); 130 return base::Bind(&NetLogGetAvailableRangeResultCallback, start, result);
131 } 131 }
132 132
133 } // namespace disk_cache 133 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698