OLD | NEW |
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 "webkit/blob/view_blob_internals_job.h" | 5 #include "webkit/blob/view_blob_internals_job.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/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 return net::OK; | 163 return net::OK; |
164 } | 164 } |
165 | 165 |
166 void ViewBlobInternalsJob::GenerateHTML(std::string* out) const { | 166 void ViewBlobInternalsJob::GenerateHTML(std::string* out) const { |
167 for (BlobStorageController::BlobMap::const_iterator iter = | 167 for (BlobStorageController::BlobMap::const_iterator iter = |
168 blob_storage_controller_->blob_map_.begin(); | 168 blob_storage_controller_->blob_map_.begin(); |
169 iter != blob_storage_controller_->blob_map_.end(); | 169 iter != blob_storage_controller_->blob_map_.end(); |
170 ++iter) { | 170 ++iter) { |
171 AddHTMLBoldText(iter->first, out); | 171 AddHTMLBoldText(iter->first, out); |
172 AddHTMLButton(kRemove, iter->first, out); | 172 AddHTMLButton(kRemove, iter->first, out); |
173 GenerateHTMLForBlobData(*iter->second, out); | 173 GenerateHTMLForBlobData(*iter->second.get(), out); |
174 } | 174 } |
175 } | 175 } |
176 | 176 |
177 void ViewBlobInternalsJob::GenerateHTMLForBlobData(const BlobData& blob_data, | 177 void ViewBlobInternalsJob::GenerateHTMLForBlobData(const BlobData& blob_data, |
178 std::string* out) { | 178 std::string* out) { |
179 StartHTMLList(out); | 179 StartHTMLList(out); |
180 | 180 |
181 if (!blob_data.content_type().empty()) | 181 if (!blob_data.content_type().empty()) |
182 AddHTMLListItem(kContentType, blob_data.content_type(), out); | 182 AddHTMLListItem(kContentType, blob_data.content_type(), out); |
183 if (!blob_data.content_disposition().empty()) | 183 if (!blob_data.content_disposition().empty()) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 238 } |
239 | 239 |
240 if (has_multi_items) | 240 if (has_multi_items) |
241 EndHTMLList(out); | 241 EndHTMLList(out); |
242 } | 242 } |
243 | 243 |
244 EndHTMLList(out); | 244 EndHTMLList(out); |
245 } | 245 } |
246 | 246 |
247 } // namespace webkit_blob | 247 } // namespace webkit_blob |
OLD | NEW |