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

Side by Side Diff: chrome/browser/extensions/crx_installer_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/download/download_crx_util.h" 5 #include "chrome/browser/download/download_crx_util.h"
6 #include "chrome/browser/download/download_service.h" 6 #include "chrome/browser/download/download_service.h"
7 #include "chrome/browser/download/download_service_factory.h" 7 #include "chrome/browser/download/download_service_factory.h"
8 #include "chrome/browser/download/download_test_observer.h" 8 #include "chrome/browser/download/download_test_observer.h"
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_browsertest.h" 10 #include "chrome/browser/extensions/extension_browsertest.h"
(...skipping 29 matching lines...) Expand all
40 void ConfirmInstall(Delegate* delegate, 40 void ConfirmInstall(Delegate* delegate,
41 const extensions::Extension* extension) { 41 const extensions::Extension* extension) {
42 confirmation_requested_ = true; 42 confirmation_requested_ = true;
43 delegate->InstallUIProceed(); 43 delegate->InstallUIProceed();
44 } 44 }
45 void OnInstallSuccess(const extensions::Extension* extension, 45 void OnInstallSuccess(const extensions::Extension* extension,
46 SkBitmap* icon) { 46 SkBitmap* icon) {
47 did_succeed_ = true; 47 did_succeed_ = true;
48 MessageLoopForUI::current()->Quit(); 48 MessageLoopForUI::current()->Quit();
49 } 49 }
50 void OnInstallFailure(const string16& error) { 50 void OnInstallFailure(const CrxInstallerError& error) {
51 error_ = error; 51 error_ = error.message();
52 MessageLoopForUI::current()->Quit(); 52 MessageLoopForUI::current()->Quit();
53 } 53 }
54 54
55 private: 55 private:
56 bool did_succeed_; 56 bool did_succeed_;
57 bool confirmation_requested_; 57 bool confirmation_requested_;
58 string16 error_; 58 string16 error_;
59 }; 59 };
60 60
61 } // namespace 61 } // namespace
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 kTestData[i]; 203 kTestData[i];
204 if (kTestData[i]) { 204 if (kTestData[i]) {
205 EXPECT_EQ(string16(), mock_prompt->error()) << kTestData[i]; 205 EXPECT_EQ(string16(), mock_prompt->error()) << kTestData[i];
206 } else { 206 } else {
207 EXPECT_EQ(l10n_util::GetStringUTF16( 207 EXPECT_EQ(l10n_util::GetStringUTF16(
208 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE), 208 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE),
209 mock_prompt->error()) << kTestData[i]; 209 mock_prompt->error()) << kTestData[i];
210 } 210 }
211 } 211 }
212 } 212 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/crx_installer_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698