| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/appcache/view_appcache_internals_job.h" | 5 #include "webkit/appcache/view_appcache_internals_job.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 const appcache::AppCacheInfo& rhs) const { | 145 const appcache::AppCacheInfo& rhs) const { |
| 146 return (lhs.manifest_url.spec() < rhs.manifest_url.spec()); | 146 return (lhs.manifest_url.spec() < rhs.manifest_url.spec()); |
| 147 } | 147 } |
| 148 } manifest_url_comparator; | 148 } manifest_url_comparator; |
| 149 | 149 |
| 150 } // namespace | 150 } // namespace |
| 151 | 151 |
| 152 namespace appcache { | 152 namespace appcache { |
| 153 | 153 |
| 154 ViewAppCacheInternalsJob::ViewAppCacheInternalsJob( | 154 ViewAppCacheInternalsJob::ViewAppCacheInternalsJob( |
| 155 URLRequest* request, | 155 net::URLRequest* request, |
| 156 AppCacheService* service) : URLRequestSimpleJob(request), | 156 AppCacheService* service) : URLRequestSimpleJob(request), |
| 157 appcache_service_(service) { | 157 appcache_service_(service) { |
| 158 } | 158 } |
| 159 | 159 |
| 160 ViewAppCacheInternalsJob::~ViewAppCacheInternalsJob() { | 160 ViewAppCacheInternalsJob::~ViewAppCacheInternalsJob() { |
| 161 // Cancel callback if job is destroyed before callback is called. | 161 // Cancel callback if job is destroyed before callback is called. |
| 162 if (appcache_done_callback_) | 162 if (appcache_done_callback_) |
| 163 appcache_done_callback_.release()->Cancel(); | 163 appcache_done_callback_.release()->Cancel(); |
| 164 } | 164 } |
| 165 | 165 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 data->append(kErrorMessage); | 250 data->append(kErrorMessage); |
| 251 else if (info_collection_->infos_by_origin.empty()) | 251 else if (info_collection_->infos_by_origin.empty()) |
| 252 data->append(kEmptyAppCachesMessage); | 252 data->append(kEmptyAppCachesMessage); |
| 253 else | 253 else |
| 254 GenerateHTMLAppCacheInfo(data); | 254 GenerateHTMLAppCacheInfo(data); |
| 255 EndHTML(data); | 255 EndHTML(data); |
| 256 return true; | 256 return true; |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace appcache | 259 } // namespace appcache |
| OLD | NEW |