| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/apps/ephemeral_app_throttle.h" | 5 #include "chrome/browser/apps/ephemeral_app_throttle.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/extensions/extension_info_map.h" | |
| 9 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
| 11 #include "chrome/browser/extensions/webstore_ephemeral_installer.h" | 10 #include "chrome/browser/extensions/webstore_ephemeral_installer.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_io_data.h" | 12 #include "chrome/browser/profiles/profile_io_data.h" |
| 14 #include "chrome/browser/ui/extensions/application_launch.h" | 13 #include "chrome/browser/ui/extensions/application_launch.h" |
| 15 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/extensions/extension_constants.h" | 15 #include "chrome/common/extensions/extension_constants.h" |
| 17 #include "components/navigation_interception/intercept_navigation_resource_throt
tle.h" | 16 #include "components/navigation_interception/intercept_navigation_resource_throt
tle.h" |
| 18 #include "components/navigation_interception/navigation_params.h" | 17 #include "components/navigation_interception/navigation_params.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 return NULL; | 102 return NULL; |
| 104 | 103 |
| 105 std::string app_id(request->url().ExtractFileName()); | 104 std::string app_id(request->url().ExtractFileName()); |
| 106 if (!Extension::IdIsValid(app_id)) | 105 if (!Extension::IdIsValid(app_id)) |
| 107 return NULL; | 106 return NULL; |
| 108 | 107 |
| 109 return new navigation_interception::InterceptNavigationResourceThrottle( | 108 return new navigation_interception::InterceptNavigationResourceThrottle( |
| 110 request, | 109 request, |
| 111 base::Bind(&LaunchEphemeralApp, app_id)); | 110 base::Bind(&LaunchEphemeralApp, app_id)); |
| 112 } | 111 } |
| OLD | NEW |