| 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 #ifndef STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ | 5 #ifndef STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ |
| 6 #define STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ | 6 #define STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "net/url_request/url_request_simple_job.h" | 12 #include "net/url_request/url_request_simple_job.h" |
| 13 #include "storage/browser/blob/blob_storage_registry.h" |
| 13 #include "storage/browser/storage_browser_export.h" | 14 #include "storage/browser/storage_browser_export.h" |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 class URLRequest; | 17 class URLRequest; |
| 17 } // namespace net | 18 } // namespace net |
| 18 | 19 |
| 19 namespace storage { | 20 namespace storage { |
| 20 | 21 |
| 21 class InternalBlobData; | 22 class InternalBlobData; |
| 22 class BlobStorageContext; | 23 class BlobStorageContext; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 std::string* charset, | 36 std::string* charset, |
| 36 std::string* data, | 37 std::string* data, |
| 37 const net::CompletionCallback& callback) const override; | 38 const net::CompletionCallback& callback) const override; |
| 38 bool IsRedirectResponse(GURL* location, int* http_status_code) override; | 39 bool IsRedirectResponse(GURL* location, int* http_status_code) override; |
| 39 void Kill() override; | 40 void Kill() override; |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 ~ViewBlobInternalsJob() override; | 43 ~ViewBlobInternalsJob() override; |
| 43 | 44 |
| 44 void GenerateHTML(std::string* out) const; | 45 void GenerateHTML(std::string* out) const; |
| 45 static void GenerateHTMLForBlobData(const InternalBlobData& blob_data, | 46 static void GenerateHTMLForBlobData(const BlobStorageRegistry::Entry& entry, |
| 46 const std::string& content_type, | 47 const std::string& content_type, |
| 47 const std::string& content_disposition, | 48 const std::string& content_disposition, |
| 48 int refcount, | 49 int refcount, |
| 49 std::string* out); | 50 std::string* out); |
| 50 | 51 |
| 51 BlobStorageContext* blob_storage_context_; | 52 BlobStorageContext* blob_storage_context_; |
| 52 base::WeakPtrFactory<ViewBlobInternalsJob> weak_factory_; | 53 base::WeakPtrFactory<ViewBlobInternalsJob> weak_factory_; |
| 53 | 54 |
| 54 DISALLOW_COPY_AND_ASSIGN(ViewBlobInternalsJob); | 55 DISALLOW_COPY_AND_ASSIGN(ViewBlobInternalsJob); |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace storage | 58 } // namespace storage |
| 58 | 59 |
| 59 #endif // STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ | 60 #endif // STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ |
| OLD | NEW |