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 "storage/browser/blob/view_blob_internals_job.h" | 5 #include "storage/browser/blob/view_blob_internals_job.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 GenerateHTML(data); | 149 GenerateHTML(data); |
150 EndHTML(data); | 150 EndHTML(data); |
151 return net::OK; | 151 return net::OK; |
152 } | 152 } |
153 | 153 |
154 void ViewBlobInternalsJob::GenerateHTML(std::string* out) const { | 154 void ViewBlobInternalsJob::GenerateHTML(std::string* out) const { |
155 for (BlobStorageRegistry::BlobMap::const_iterator iter = | 155 for (BlobStorageRegistry::BlobMap::const_iterator iter = |
156 blob_storage_context_->registry_.blob_map_.begin(); | 156 blob_storage_context_->registry_.blob_map_.begin(); |
157 iter != blob_storage_context_->registry_.blob_map_.end(); ++iter) { | 157 iter != blob_storage_context_->registry_.blob_map_.end(); ++iter) { |
158 AddHTMLBoldText(iter->first, out); | 158 AddHTMLBoldText(iter->first, out); |
159 GenerateHTMLForBlobData(*iter->second->data, iter->second->content_type, | 159 GenerateHTMLForBlobData(iter->second->data, iter->second->content_type, |
160 iter->second->content_disposition, | 160 iter->second->content_disposition, |
161 iter->second->refcount, out); | 161 iter->second->refcount, out); |
162 } | 162 } |
163 if (!blob_storage_context_->registry_.url_to_uuid_.empty()) { | 163 if (!blob_storage_context_->registry_.url_to_uuid_.empty()) { |
164 AddHorizontalRule(out); | 164 AddHorizontalRule(out); |
165 for (BlobStorageRegistry::URLMap::const_iterator iter = | 165 for (BlobStorageRegistry::URLMap::const_iterator iter = |
166 blob_storage_context_->registry_.url_to_uuid_.begin(); | 166 blob_storage_context_->registry_.url_to_uuid_.begin(); |
167 iter != blob_storage_context_->registry_.url_to_uuid_.end(); ++iter) { | 167 iter != blob_storage_context_->registry_.url_to_uuid_.end(); ++iter) { |
168 AddHTMLBoldText(iter->first.spec(), out); | 168 AddHTMLBoldText(iter->first.spec(), out); |
169 StartHTMLList(out); | 169 StartHTMLList(out); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 } | 248 } |
249 | 249 |
250 if (has_multi_items) | 250 if (has_multi_items) |
251 EndHTMLList(out); | 251 EndHTMLList(out); |
252 } | 252 } |
253 | 253 |
254 EndHTMLList(out); | 254 EndHTMLList(out); |
255 } | 255 } |
256 | 256 |
257 } // namespace storage | 257 } // namespace storage |
OLD | NEW |