| 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/webstore_reinstaller.h" | 5 #include "chrome/browser/extensions/webstore_reinstaller.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "chrome/browser/extensions/extension_install_prompt.h" | 8 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 bool WebstoreReinstaller::CheckRequestorAlive() const { | 39 bool WebstoreReinstaller::CheckRequestorAlive() const { |
| 40 return web_contents() != NULL; | 40 return web_contents() != NULL; |
| 41 } | 41 } |
| 42 | 42 |
| 43 const GURL& WebstoreReinstaller::GetRequestorURL() const { | 43 const GURL& WebstoreReinstaller::GetRequestorURL() const { |
| 44 return GURL::EmptyGURL(); | 44 return GURL::EmptyGURL(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 scoped_ptr<ExtensionInstallPrompt::Prompt> | 47 std::unique_ptr<ExtensionInstallPrompt::Prompt> |
| 48 WebstoreReinstaller::CreateInstallPrompt() const { | 48 WebstoreReinstaller::CreateInstallPrompt() const { |
| 49 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( | 49 std::unique_ptr<ExtensionInstallPrompt::Prompt> prompt( |
| 50 new ExtensionInstallPrompt::Prompt( | 50 new ExtensionInstallPrompt::Prompt( |
| 51 ExtensionInstallPrompt::REPAIR_PROMPT)); | 51 ExtensionInstallPrompt::REPAIR_PROMPT)); |
| 52 prompt->SetWebstoreData(localized_user_count(), | 52 prompt->SetWebstoreData(localized_user_count(), |
| 53 show_user_count(), | 53 show_user_count(), |
| 54 average_rating(), | 54 average_rating(), |
| 55 rating_count()); | 55 rating_count()); |
| 56 return prompt; | 56 return prompt; |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool WebstoreReinstaller::ShouldShowPostInstallUI() const { | 59 bool WebstoreReinstaller::ShouldShowPostInstallUI() const { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 AbortInstall(); | 104 AbortInstall(); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 void WebstoreReinstaller::OnDeletionDone() { | 108 void WebstoreReinstaller::OnDeletionDone() { |
| 109 WebstoreStandaloneInstaller::OnInstallPromptDone( | 109 WebstoreStandaloneInstaller::OnInstallPromptDone( |
| 110 ExtensionInstallPrompt::Result::ACCEPTED); | 110 ExtensionInstallPrompt::Result::ACCEPTED); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace extensions | 113 } // namespace extensions |
| OLD | NEW |