158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// found in the LICENSE file.
458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)#ifndef CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_
658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)#define CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_
758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)#include "base/basictypes.h"
958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
1058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)namespace content {
1158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)class ResourceThrottle;
1258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)}
1358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
1458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)namespace net {
1558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)class URLRequest;
1658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)}
1758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
1858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)class ProfileIOData;
1958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
2058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// This class creates resource throttles that redirect URLs to apps that
2158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// have a matching URL handler in the 'url_handlers' manifest key.
2258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)class AppUrlRedirector {
2358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) public:
2458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)  static content::ResourceThrottle* MaybeCreateThrottleFor(
2558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)      net::URLRequest* request,
2658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)      ProfileIOData* profile_io_data);
2758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
2858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) private:
2958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(AppUrlRedirector);
3058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)};
3158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
3258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)#endif  // CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_
33