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