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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // A job subclass that implements a protocol to inspect the internal | 23 // A job subclass that implements a protocol to inspect the internal |
24 // state of blob registry. | 24 // state of blob registry. |
25 class STORAGE_EXPORT ViewBlobInternalsJob | 25 class STORAGE_EXPORT ViewBlobInternalsJob |
26 : public net::URLRequestSimpleJob { | 26 : public net::URLRequestSimpleJob { |
27 public: | 27 public: |
28 ViewBlobInternalsJob(net::URLRequest* request, | 28 ViewBlobInternalsJob(net::URLRequest* request, |
29 net::NetworkDelegate* network_delegate, | 29 net::NetworkDelegate* network_delegate, |
30 BlobStorageContext* blob_storage_context); | 30 BlobStorageContext* blob_storage_context); |
31 | 31 |
32 virtual void Start() OVERRIDE; | 32 virtual void Start() override; |
33 virtual int GetData(std::string* mime_type, | 33 virtual int GetData(std::string* mime_type, |
34 std::string* charset, | 34 std::string* charset, |
35 std::string* data, | 35 std::string* data, |
36 const net::CompletionCallback& callback) const OVERRIDE; | 36 const net::CompletionCallback& callback) const override; |
37 virtual bool IsRedirectResponse(GURL* location, | 37 virtual bool IsRedirectResponse(GURL* location, |
38 int* http_status_code) OVERRIDE; | 38 int* http_status_code) override; |
39 virtual void Kill() OVERRIDE; | 39 virtual void Kill() override; |
40 | 40 |
41 private: | 41 private: |
42 virtual ~ViewBlobInternalsJob(); | 42 virtual ~ViewBlobInternalsJob(); |
43 | 43 |
44 void GenerateHTML(std::string* out) const; | 44 void GenerateHTML(std::string* out) const; |
45 static void GenerateHTMLForBlobData(const BlobData& blob_data, | 45 static void GenerateHTMLForBlobData(const BlobData& blob_data, |
46 int refcount, | 46 int refcount, |
47 std::string* out); | 47 std::string* out); |
48 | 48 |
49 BlobStorageContext* blob_storage_context_; | 49 BlobStorageContext* blob_storage_context_; |
50 base::WeakPtrFactory<ViewBlobInternalsJob> weak_factory_; | 50 base::WeakPtrFactory<ViewBlobInternalsJob> weak_factory_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(ViewBlobInternalsJob); | 52 DISALLOW_COPY_AND_ASSIGN(ViewBlobInternalsJob); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace storage | 55 } // namespace storage |
56 | 56 |
57 #endif // STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ | 57 #endif // STORAGE_BROWSER_BLOB_VIEW_BLOB_INTERNALS_JOB_H_ |
OLD | NEW |