| 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/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 MockAbortExtensionInstallPrompt() : ExtensionInstallPrompt(NULL) {} | 234 MockAbortExtensionInstallPrompt() : ExtensionInstallPrompt(NULL) {} |
| 235 | 235 |
| 236 // Simulate a user abort on an extension installation. | 236 // Simulate a user abort on an extension installation. |
| 237 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) { | 237 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) { |
| 238 delegate->InstallUIAbort(true); | 238 delegate->InstallUIAbort(true); |
| 239 MessageLoopForUI::current()->Quit(); | 239 MessageLoopForUI::current()->Quit(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 virtual void OnInstallSuccess(const Extension* extension, SkBitmap* icon) {} | 242 virtual void OnInstallSuccess(const Extension* extension, SkBitmap* icon) {} |
| 243 | 243 |
| 244 virtual void OnInstallFailure(const string16& error) {} | 244 virtual void OnInstallFailure(const CrxInstallerError& error) {} |
| 245 }; | 245 }; |
| 246 | 246 |
| 247 class MockAutoConfirmExtensionInstallPrompt : public ExtensionInstallPrompt { | 247 class MockAutoConfirmExtensionInstallPrompt : public ExtensionInstallPrompt { |
| 248 public: | 248 public: |
| 249 explicit MockAutoConfirmExtensionInstallPrompt(Browser* browser) : | 249 explicit MockAutoConfirmExtensionInstallPrompt(Browser* browser) : |
| 250 ExtensionInstallPrompt(browser) {} | 250 ExtensionInstallPrompt(browser) {} |
| 251 | 251 |
| 252 // Proceed without confirmation prompt. | 252 // Proceed without confirmation prompt. |
| 253 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) { | 253 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) { |
| 254 delegate->InstallUIProceed(); | 254 delegate->InstallUIProceed(); |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 case content::NOTIFICATION_LOAD_STOP: | 620 case content::NOTIFICATION_LOAD_STOP: |
| 621 VLOG(1) << "Got LOAD_STOP notification."; | 621 VLOG(1) << "Got LOAD_STOP notification."; |
| 622 MessageLoopForUI::current()->Quit(); | 622 MessageLoopForUI::current()->Quit(); |
| 623 break; | 623 break; |
| 624 | 624 |
| 625 default: | 625 default: |
| 626 NOTREACHED(); | 626 NOTREACHED(); |
| 627 break; | 627 break; |
| 628 } | 628 } |
| 629 } | 629 } |
| OLD | NEW |