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/bundle_installer.h" | 5 #include "chrome/browser/extensions/bundle_installer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 for (size_t i = 0; i < dummy_extensions_.size(); ++i) { | 260 for (size_t i = 0; i < dummy_extensions_.size(); ++i) { |
261 permissions = ExtensionPermissionSet::CreateUnion( | 261 permissions = ExtensionPermissionSet::CreateUnion( |
262 permissions, dummy_extensions_[i]->required_permission_set()); | 262 permissions, dummy_extensions_[i]->required_permission_set()); |
263 } | 263 } |
264 | 264 |
265 if (g_auto_approve_for_test == PROCEED) { | 265 if (g_auto_approve_for_test == PROCEED) { |
266 InstallUIProceed(); | 266 InstallUIProceed(); |
267 } else if (g_auto_approve_for_test == ABORT) { | 267 } else if (g_auto_approve_for_test == ABORT) { |
268 InstallUIAbort(true); | 268 InstallUIAbort(true); |
269 } else { | 269 } else { |
270 install_ui_.reset(new ExtensionInstallUI(profile_)); | 270 install_ui_.reset(new ExtensionInstallPrompt(profile_)); |
271 install_ui_->ConfirmBundleInstall(this, permissions); | 271 install_ui_->ConfirmBundleInstall(this, permissions); |
272 } | 272 } |
273 } | 273 } |
274 | 274 |
275 void BundleInstaller::ShowInstalledBubbleIfDone() { | 275 void BundleInstaller::ShowInstalledBubbleIfDone() { |
276 // We're ready to show the installed bubble when no items are pending. | 276 // We're ready to show the installed bubble when no items are pending. |
277 if (!GetItemsWithState(Item::STATE_PENDING).empty()) | 277 if (!GetItemsWithState(Item::STATE_PENDING).empty()) |
278 return; | 278 return; |
279 | 279 |
280 if (browser_) | 280 if (browser_) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 void BundleInstaller::OnBrowserAdded(Browser* browser) {} | 335 void BundleInstaller::OnBrowserAdded(Browser* browser) {} |
336 | 336 |
337 void BundleInstaller::OnBrowserRemoved(Browser* browser) { | 337 void BundleInstaller::OnBrowserRemoved(Browser* browser) { |
338 if (browser_ == browser) | 338 if (browser_ == browser) |
339 browser_ = NULL; | 339 browser_ = NULL; |
340 } | 340 } |
341 | 341 |
342 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} | 342 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} |
343 | 343 |
344 } // namespace extensions | 344 } // namespace extensions |
OLD | NEW |