ephemeral_app_throttle.h revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
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_EPHEMERAL_APP_THROTTLE_H_ 6#define CHROME_BROWSER_APPS_EPHEMERAL_APP_THROTTLE_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 will launch ephemeral apps for 21// links to Chrome Web Store detail pages instead of opening the page in the 22// browser. This will only occur if the enable-ephemeral-apps switch is enabled. 23class EphemeralAppThrottle { 24 public: 25 static content::ResourceThrottle* MaybeCreateThrottleForLaunch( 26 net::URLRequest* request, 27 ProfileIOData* profile_io_data); 28 29 private: 30 DISALLOW_COPY_AND_ASSIGN(EphemeralAppThrottle); 31}; 32 33#endif // CHROME_BROWSER_APPS_EPHEMERAL_APP_THROTTLE_H_ 34