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/about_protocol_handler.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/about_protocol_handler.h')
-rw-r--r-- | components/about_handler/about_protocol_handler.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/components/about_handler/about_protocol_handler.h b/components/about_handler/about_protocol_handler.h new file mode 100644 index 0000000..ad8adfb --- /dev/null +++ b/components/about_handler/about_protocol_handler.h @@ -0,0 +1,30 @@ +// Copyright (c) 2012 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_ABOUT_PROTOCOL_HANDLER_H_ +#define COMPONENTS_ABOUT_HANDLER_ABOUT_PROTOCOL_HANDLER_H_ + +#include "base/basictypes.h" +#include "base/compiler_specific.h" +#include "net/url_request/url_request_job_factory.h" + +namespace about_handler { + +// Implements a ProtocolHandler for About jobs. +class AboutProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { + public: + AboutProtocolHandler(); + ~AboutProtocolHandler() override; + net::URLRequestJob* MaybeCreateJob( + net::URLRequest* request, + net::NetworkDelegate* network_delegate) const override; + bool IsSafeRedirectTarget(const GURL& location) const override; + + private: + DISALLOW_COPY_AND_ASSIGN(AboutProtocolHandler); +}; + +} // namespace about_handler + +#endif // COMPONENTS_ABOUT_HANDLER_ABOUT_PROTOCOL_HANDLER_H_ |