Index: chrome/browser/extensions/app_host_installer.cc |
diff --git a/chrome/browser/extensions/app_host_installer.cc b/chrome/browser/extensions/app_host_installer.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..085933fd705a10a3e958d6c6e5387ced91c5ae24 |
--- /dev/null |
+++ b/chrome/browser/extensions/app_host_installer.cc |
@@ -0,0 +1,33 @@ |
+// 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. |
+ |
+#include "chrome/browser/extensions/app_host_installer.h" |
+#include "chrome/common/extensions/extension.h" |
+ |
+#include "base/callback.h" |
+ |
+#if defined(OS_WIN) |
+#include "chrome/browser/extensions/app_host_installer_impl_win.h" |
+#endif |
+ |
+namespace extensions { |
+ |
+namespace app_host_installer { |
+ |
+void InstallAppHostIfNecessary( |
+ const Extension& extension, |
+ const OnAppHostInstallationCompleteCallback& completion_callback) { |
+#if defined(OS_WIN) |
benwells
2012/11/01 23:11:46
I think this platform specific pattern is a little
erikwright (departed)
2012/11/02 01:07:26
By default, I think x_win.cc will only be built on
benwells
2012/11/02 01:29:25
Yes, x_win.cc is only built on Windows. You do not
huangs
2012/11/02 18:39:01
Done. So:
-- app_host_installer.cc
-- app_host_in
|
+ if (extension.is_platform_app()) |
+ AppHostInstallerImpl::EnsureAppHostInstalled(completion_callback); |
+ else |
+ completion_callback.Run(true); |
+#else |
+ completion_callback.Run(true); |
+#endif |
+} |
+ |
+} // namespace app_host_installer |
+ |
+} // namespace extensions |