OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/install_chrome_app.h" | 5 #include "chrome/browser/apps/install_chrome_app.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 : WebstoreInstallWithPrompt( | 47 : WebstoreInstallWithPrompt( |
48 app_id, | 48 app_id, |
49 profile, | 49 profile, |
50 parent_window, | 50 parent_window, |
51 extensions::WebstoreStandaloneInstaller::Callback()) {} | 51 extensions::WebstoreStandaloneInstaller::Callback()) {} |
52 | 52 |
53 private: | 53 private: |
54 virtual ~WebstoreInstallWithPromptAppsOnly() {} | 54 virtual ~WebstoreInstallWithPromptAppsOnly() {} |
55 | 55 |
56 // extensions::WebstoreStandaloneInstaller overrides: | 56 // extensions::WebstoreStandaloneInstaller overrides: |
57 virtual void OnManifestParsed() OVERRIDE; | 57 virtual void OnManifestParsed() override; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(WebstoreInstallWithPromptAppsOnly); | 59 DISALLOW_COPY_AND_ASSIGN(WebstoreInstallWithPromptAppsOnly); |
60 }; | 60 }; |
61 | 61 |
62 void WebstoreInstallWithPromptAppsOnly::OnManifestParsed() { | 62 void WebstoreInstallWithPromptAppsOnly::OnManifestParsed() { |
63 if (!manifest()->HasKey(extensions::manifest_keys::kApp)) { | 63 if (!manifest()->HasKey(extensions::manifest_keys::kApp)) { |
64 CompleteInstall(extensions::webstore_install::NOT_PERMITTED, | 64 CompleteInstall(extensions::webstore_install::NOT_PERMITTED, |
65 kInstallChromeAppErrorNotAnApp); | 65 kInstallChromeAppErrorNotAnApp); |
66 return; | 66 return; |
67 } | 67 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (installed_extension) | 102 if (installed_extension) |
103 return; | 103 return; |
104 | 104 |
105 WebstoreInstallWithPromptAppsOnly* installer = | 105 WebstoreInstallWithPromptAppsOnly* installer = |
106 new WebstoreInstallWithPromptAppsOnly( | 106 new WebstoreInstallWithPromptAppsOnly( |
107 app_id, browser->profile(), browser->window()->GetNativeWindow()); | 107 app_id, browser->profile(), browser->window()->GetNativeWindow()); |
108 installer->BeginInstall(); | 108 installer->BeginInstall(); |
109 } | 109 } |
110 | 110 |
111 } // namespace install_chrome_app | 111 } // namespace install_chrome_app |
OLD | NEW |