Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: storage/browser/blob/view_blob_internals_job.h

Issue 2865243002: Implement chrome://blob-internals with network service. (Closed)
Patch Set: self nit Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 20 matching lines...) Expand all
31 BlobStorageContext* blob_storage_context); 31 BlobStorageContext* blob_storage_context);
32 32
33 void Start() override; 33 void Start() override;
34 int GetData(std::string* mime_type, 34 int GetData(std::string* mime_type,
35 std::string* charset, 35 std::string* charset,
36 std::string* data, 36 std::string* data,
37 const net::CompletionCallback& callback) const override; 37 const net::CompletionCallback& callback) const override;
38 bool IsRedirectResponse(GURL* location, int* http_status_code) override; 38 bool IsRedirectResponse(GURL* location, int* http_status_code) override;
39 void Kill() override; 39 void Kill() override;
40 40
41 static std::string GenerateHTML(BlobStorageContext* blob_storage_context);
42
41 private: 43 private:
42 ~ViewBlobInternalsJob() override; 44 ~ViewBlobInternalsJob() override;
43 45
44 void GenerateHTML(std::string* out) const;
45 static void GenerateHTMLForBlobData(const BlobEntry& blob_data, 46 static void GenerateHTMLForBlobData(const BlobEntry& blob_data,
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698