| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/appcache/appcache_internals_ui.h" | 5 #include "content/browser/appcache/appcache_internals_ui.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 BrowserThread::IO, FROM_HERE, | 258 BrowserThread::IO, FROM_HERE, |
| 259 base::Bind(&Proxy::RequestFileDetails, this, response_enquiry)); | 259 base::Bind(&Proxy::RequestFileDetails, this, response_enquiry)); |
| 260 return; | 260 return; |
| 261 } | 261 } |
| 262 DCHECK(!shutdown_called_); | 262 DCHECK(!shutdown_called_); |
| 263 response_enquiries_.push_back(response_enquiry); | 263 response_enquiries_.push_back(response_enquiry); |
| 264 HandleFileDetailsRequest(); | 264 HandleFileDetailsRequest(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void AppCacheInternalsUI::Proxy::HandleFileDetailsRequest() { | 267 void AppCacheInternalsUI::Proxy::HandleFileDetailsRequest() { |
| 268 if (preparing_response_ || !response_enquiries_.size() || !appcache_service_) | 268 if (preparing_response_ || response_enquiries_.empty() || !appcache_service_) |
| 269 return; | 269 return; |
| 270 preparing_response_ = true; | 270 preparing_response_ = true; |
| 271 appcache_service_->storage()->LoadResponseInfo( | 271 appcache_service_->storage()->LoadResponseInfo( |
| 272 GURL(response_enquiries_.front().manifest_url), | 272 GURL(response_enquiries_.front().manifest_url), |
| 273 response_enquiries_.front().response_id, this); | 273 response_enquiries_.front().response_id, this); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void AppCacheInternalsUI::Proxy::OnResponseInfoLoaded( | 276 void AppCacheInternalsUI::Proxy::OnResponseInfoLoaded( |
| 277 AppCacheResponseInfo* response, | 277 AppCacheResponseInfo* response, |
| 278 int64_t response_id) { | 278 int64_t response_id) { |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 const base::FilePath& partition_path) { | 502 const base::FilePath& partition_path) { |
| 503 for (const scoped_refptr<Proxy>& proxy : appcache_proxies_) { | 503 for (const scoped_refptr<Proxy>& proxy : appcache_proxies_) { |
| 504 if (proxy->partition_path_ == partition_path) | 504 if (proxy->partition_path_ == partition_path) |
| 505 return proxy.get(); | 505 return proxy.get(); |
| 506 } | 506 } |
| 507 NOTREACHED(); | 507 NOTREACHED(); |
| 508 return nullptr; | 508 return nullptr; |
| 509 } | 509 } |
| 510 | 510 |
| 511 } // namespace content | 511 } // namespace content |
| OLD | NEW |