Index: mojo/fetcher/data_fetcher.h |
diff --git a/mojo/fetcher/about_fetcher.h b/mojo/fetcher/data_fetcher.h |
similarity index 59% |
copy from mojo/fetcher/about_fetcher.h |
copy to mojo/fetcher/data_fetcher.h |
index 456125a284ef22f573cbc5e0d31380d1ee7fc8a2..b94b796489f2d7f5aaeea4f44b67c76cfdc6cd82 100644 |
--- a/mojo/fetcher/about_fetcher.h |
+++ b/mojo/fetcher/data_fetcher.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef MOJO_FETCHER_ABOUT_FETCHER_H_ |
-#define MOJO_FETCHER_ABOUT_FETCHER_H_ |
+#ifndef MOJO_FETCHER_DATA_FETCHER_H_ |
+#define MOJO_FETCHER_DATA_FETCHER_H_ |
#include "mojo/shell/fetcher.h" |
@@ -14,24 +14,16 @@ |
namespace mojo { |
namespace fetcher { |
-// Implements Fetcher for about: URLs. |
-class AboutFetcher : public shell::Fetcher { |
+// Implements Fetcher for data: URLs. |
+class DataFetcher : public shell::Fetcher { |
public: |
- static const char kAboutScheme[]; |
- static const char kAboutBlankURL[]; |
- |
static void Start(const GURL& url, const FetchCallback& loader_callback); |
private: |
- AboutFetcher(const GURL& url, const FetchCallback& loader_callback); |
- ~AboutFetcher() override; |
- |
- void BuildResponse(); |
+ DataFetcher(const GURL& url, const FetchCallback& loader_callback); |
+ ~DataFetcher() override; |
- // Must be called exactly once to run the loader callback (asynchrously). On |
- // success, the ownership of this object is passed to the loader callback; |
- // otherwise, the callback is run with a nullptr and this object is destroyed. |
- void PostToRunCallback(bool success); |
+ void BuildAndDispatchResponse(); |
// shell::Fetcher implementation. |
const GURL& GetURL() const override; |
@@ -49,10 +41,10 @@ class AboutFetcher : public shell::Fetcher { |
const GURL url_; |
URLResponsePtr response_; |
- DISALLOW_COPY_AND_ASSIGN(AboutFetcher); |
+ DISALLOW_COPY_AND_ASSIGN(DataFetcher); |
}; |
} // namespace fetcher |
} // namespace mojo |
-#endif // MOJO_FETCHER_ABOUT_FETCHER_H_ |
+#endif // MOJO_FETCHER_DATA_FETCHER_H_ |