diff options
author | jitendra.ks <jitendra.ks@samsung.com> | 2015-08-14 04:40:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-14 11:40:57 +0000 |
commit | 4f2e9111a6457a4010bb3ca11047dc5a1840f17b (patch) | |
tree | 2622d2a928b8a97740000f9cc3673d8f58afa029 /components/about_handler/url_request_about_job.h | |
parent | ed8fd74d0a10ab999ff31799b4918985ab093300 (diff) | |
download | chromium_src-4f2e9111a6457a4010bb3ca11047dc5a1840f17b.zip chromium_src-4f2e9111a6457a4010bb3ca11047dc5a1840f17b.tar.gz chromium_src-4f2e9111a6457a4010bb3ca11047dc5a1840f17b.tar.bz2 |
Create a about handler component.
Create a about handler component.
The following files ::
chrome/browser/net/about_protocol_handler.*
net/url_request/url_request_about_job.*
moved to new component: components/about_handler.
Also added GYP and GN file for same.
BUG=516695
Review URL: https://codereview.chromium.org/1284173003
Cr-Commit-Position: refs/heads/master@{#343366}
Diffstat (limited to 'components/about_handler/url_request_about_job.h')
-rw-r--r-- | components/about_handler/url_request_about_job.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/components/about_handler/url_request_about_job.h b/components/about_handler/url_request_about_job.h new file mode 100644 index 0000000..e37c568 --- /dev/null +++ b/components/about_handler/url_request_about_job.h @@ -0,0 +1,35 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_ +#define COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_ + +#include <string> + +#include "base/memory/weak_ptr.h" +#include "net/url_request/url_request.h" +#include "net/url_request/url_request_job.h" + +namespace about_handler { + +class URLRequestAboutJob : public net::URLRequestJob { + public: + URLRequestAboutJob(net::URLRequest* request, + net::NetworkDelegate* network_delegate); + + // URLRequestJob: + void Start() override; + bool GetMimeType(std::string* mime_type) const override; + + private: + ~URLRequestAboutJob() override; + + void StartAsync(); + + base::WeakPtrFactory<URLRequestAboutJob> weak_factory_; +}; + +} // namespace about_handler + +#endif // COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_ |