Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 10581043: Merge 142921 - Use an infobar instead of alert box for extension install (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer_error.h ('k') | chrome/browser/extensions/extension_install_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698