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

Side by Side Diff: chrome/browser/extensions/api/permissions/permissions_api.cc

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced + mac fix 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/api/permissions/permissions_api.h" 5 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h" 8 #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/permissions_updater.h" 10 #include "chrome/browser/extensions/permissions_updater.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // we're skipping the confirmation UI. All extension types but INTERNAL 196 // we're skipping the confirmation UI. All extension types but INTERNAL
197 // are allowed to silently increase their permission level. 197 // are allowed to silently increase their permission level.
198 if (auto_confirm_for_tests == PROCEED || 198 if (auto_confirm_for_tests == PROCEED ||
199 requested_permissions_->GetWarningMessages().size() == 0) { 199 requested_permissions_->GetWarningMessages().size() == 0) {
200 InstallUIProceed(); 200 InstallUIProceed();
201 } else if (auto_confirm_for_tests == ABORT) { 201 } else if (auto_confirm_for_tests == ABORT) {
202 // Pretend the user clicked cancel. 202 // Pretend the user clicked cancel.
203 InstallUIAbort(true); 203 InstallUIAbort(true);
204 } else { 204 } else {
205 CHECK_EQ(DO_NOT_SKIP, auto_confirm_for_tests); 205 CHECK_EQ(DO_NOT_SKIP, auto_confirm_for_tests);
206 install_ui_.reset(new ExtensionInstallUI(profile())); 206 install_ui_.reset(new ExtensionInstallPrompt(profile()));
207 install_ui_->ConfirmPermissions( 207 install_ui_->ConfirmPermissions(
208 this, GetExtension(), requested_permissions_.get()); 208 this, GetExtension(), requested_permissions_.get());
209 } 209 }
210 210
211 return true; 211 return true;
212 } 212 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698