OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void ViewBlobInternalsJob::Kill() { | 127 void ViewBlobInternalsJob::Kill() { |
128 net::URLRequestSimpleJob::Kill(); | 128 net::URLRequestSimpleJob::Kill(); |
129 method_factory_.RevokeAll(); | 129 method_factory_.RevokeAll(); |
130 } | 130 } |
131 | 131 |
132 void ViewBlobInternalsJob::DoWorkAsync() { | 132 void ViewBlobInternalsJob::DoWorkAsync() { |
133 if (request_->url().has_query() && | 133 if (request_->url().has_query() && |
134 StartsWithASCII(request_->url().query(), "remove=", true)) { | 134 StartsWithASCII(request_->url().query(), "remove=", true)) { |
135 std::string blob_url = request_->url().query().substr(strlen("remove=")); | 135 std::string blob_url = request_->url().query().substr(strlen("remove=")); |
136 blob_url = net::UnescapeURLComponent(blob_url, | 136 blob_url = net::UnescapeURLComponent(blob_url, |
137 UnescapeRule::NORMAL | UnescapeRule::URL_SPECIAL_CHARS); | 137 net::UnescapeRule::NORMAL | net::UnescapeRule::URL_SPECIAL_CHARS); |
138 blob_storage_controller_->RemoveBlob(GURL(blob_url)); | 138 blob_storage_controller_->RemoveBlob(GURL(blob_url)); |
139 } | 139 } |
140 | 140 |
141 StartAsync(); | 141 StartAsync(); |
142 } | 142 } |
143 | 143 |
144 bool ViewBlobInternalsJob::GetData(std::string* mime_type, | 144 bool ViewBlobInternalsJob::GetData(std::string* mime_type, |
145 std::string* charset, | 145 std::string* charset, |
146 std::string* data) const { | 146 std::string* data) const { |
147 mime_type->assign("text/html"); | 147 mime_type->assign("text/html"); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 | 226 |
227 if (has_multi_items) | 227 if (has_multi_items) |
228 EndHTMLList(out); | 228 EndHTMLList(out); |
229 } | 229 } |
230 | 230 |
231 EndHTMLList(out); | 231 EndHTMLList(out); |
232 } | 232 } |
233 | 233 |
234 } // namespace webkit_blob | 234 } // namespace webkit_blob |
OLD | NEW |