OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/download/download_crx_util.h" | 5 #include "chrome/browser/download/download_crx_util.h" |
6 #include "chrome/browser/extensions/crx_installer.h" | 6 #include "chrome/browser/extensions/crx_installer.h" |
7 #include "chrome/browser/extensions/extension_browsertest.h" | 7 #include "chrome/browser/extensions/extension_browsertest.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/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual void ConfirmInstall( | 48 virtual void ConfirmInstall( |
49 Delegate* delegate, | 49 Delegate* delegate, |
50 const Extension* extension, | 50 const Extension* extension, |
51 const ShowDialogCallback& show_dialog_callback) OVERRIDE { | 51 const ShowDialogCallback& show_dialog_callback) OVERRIDE { |
52 confirmation_requested_ = true; | 52 confirmation_requested_ = true; |
53 delegate->InstallUIProceed(); | 53 delegate->InstallUIProceed(); |
54 } | 54 } |
55 virtual void OnInstallSuccess(const Extension* extension, | 55 virtual void OnInstallSuccess(const Extension* extension, |
56 SkBitmap* icon) OVERRIDE { | 56 SkBitmap* icon) OVERRIDE { |
57 extension_ = extension; | 57 extension_ = extension; |
58 MessageLoopForUI::current()->Quit(); | 58 base::MessageLoopForUI::current()->Quit(); |
59 } | 59 } |
60 virtual void OnInstallFailure(const CrxInstallerError& error) OVERRIDE { | 60 virtual void OnInstallFailure(const CrxInstallerError& error) OVERRIDE { |
61 error_ = error.message(); | 61 error_ = error.message(); |
62 MessageLoopForUI::current()->Quit(); | 62 base::MessageLoopForUI::current()->Quit(); |
63 } | 63 } |
64 | 64 |
65 private: | 65 private: |
66 bool confirmation_requested_; | 66 bool confirmation_requested_; |
67 string16 error_; | 67 string16 error_; |
68 const Extension* extension_; | 68 const Extension* extension_; |
69 }; | 69 }; |
70 | 70 |
71 MockInstallPrompt* CreateMockInstallPromptForBrowser(Browser* browser) { | 71 MockInstallPrompt* CreateMockInstallPromptForBrowser(Browser* browser) { |
72 return new MockInstallPrompt( | 72 return new MockInstallPrompt( |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 EXPECT_EQ(string16(), mock_prompt->error()) << kTestData[i]; | 277 EXPECT_EQ(string16(), mock_prompt->error()) << kTestData[i]; |
278 } else { | 278 } else { |
279 EXPECT_EQ(l10n_util::GetStringUTF16( | 279 EXPECT_EQ(l10n_util::GetStringUTF16( |
280 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), | 280 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), |
281 mock_prompt->error()) << kTestData[i]; | 281 mock_prompt->error()) << kTestData[i]; |
282 } | 282 } |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 } // namespace extensions | 286 } // namespace extensions |
OLD | NEW |