1// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_
6#define CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_
7
8#include "base/basictypes.h"
9
10namespace content {
11class ResourceThrottle;
12}
13
14namespace net {
15class URLRequest;
16}
17
18class ProfileIOData;
19
20// This class creates resource throttles that redirect URLs to apps that
21// have a matching URL handler in the 'url_handlers' manifest key.
22class AppUrlRedirector {
23 public:
24  static content::ResourceThrottle* MaybeCreateThrottleFor(
25      net::URLRequest* request,
26      ProfileIOData* profile_io_data);
27
28 private:
29  DISALLOW_COPY_AND_ASSIGN(AppUrlRedirector);
30};
31
32#endif  // CHROME_BROWSER_APPS_APP_URL_REDIRECTOR_H_
33