| 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/extensions/api/inline_install_private/inline_install_pr
ivate_api.h" | 5 #include "chrome/browser/extensions/api/inline_install_private/inline_install_pr
ivate_api.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "chrome/browser/extensions/webstore_install_with_prompt.h" | 9 #include "chrome/browser/extensions/webstore_install_with_prompt.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 scoped_ptr<ExtensionInstallPrompt::Prompt> Installer::CreateInstallPrompt() | 55 scoped_ptr<ExtensionInstallPrompt::Prompt> Installer::CreateInstallPrompt() |
| 56 const { | 56 const { |
| 57 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( | 57 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( |
| 58 new ExtensionInstallPrompt::Prompt( | 58 new ExtensionInstallPrompt::Prompt( |
| 59 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT)); | 59 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT)); |
| 60 prompt->SetWebstoreData(localized_user_count(), | 60 prompt->SetWebstoreData(localized_user_count(), |
| 61 show_user_count(), | 61 show_user_count(), |
| 62 average_rating(), | 62 average_rating(), |
| 63 rating_count()); | 63 rating_count()); |
| 64 return prompt.Pass(); | 64 return prompt; |
| 65 } | 65 } |
| 66 | 66 |
| 67 | 67 |
| 68 void Installer::OnManifestParsed() { | 68 void Installer::OnManifestParsed() { |
| 69 if (manifest() == nullptr) { | 69 if (manifest() == nullptr) { |
| 70 CompleteInstall(webstore_install::INVALID_MANIFEST, std::string()); | 70 CompleteInstall(webstore_install::INVALID_MANIFEST, std::string()); |
| 71 return; | 71 return; |
| 72 } | 72 } |
| 73 | 73 |
| 74 Manifest parsed_manifest(Manifest::INTERNAL, | 74 Manifest parsed_manifest(Manifest::INTERNAL, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 ExtensionFunction::ResponseValue | 139 ExtensionFunction::ResponseValue |
| 140 InlineInstallPrivateInstallFunction::CreateResponse( | 140 InlineInstallPrivateInstallFunction::CreateResponse( |
| 141 const std::string& error, webstore_install::Result result) { | 141 const std::string& error, webstore_install::Result result) { |
| 142 return ArgumentList(api::inline_install_private::Install::Results::Create( | 142 return ArgumentList(api::inline_install_private::Install::Results::Create( |
| 143 error, | 143 error, |
| 144 api::webstore::kInstallResultCodes[result])); | 144 api::webstore::kInstallResultCodes[result])); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace extensions | 147 } // namespace extensions |
| OLD | NEW |