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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 ShowPrompt(); | 248 ShowPrompt(); |
249 } | 249 } |
250 | 250 |
251 void BundleInstaller::ShowPrompt() { | 251 void BundleInstaller::ShowPrompt() { |
252 // Abort if we couldn't create any Extensions out of the manifests. | 252 // Abort if we couldn't create any Extensions out of the manifests. |
253 if (dummy_extensions_.empty()) { | 253 if (dummy_extensions_.empty()) { |
254 ReportCanceled(false); | 254 ReportCanceled(false); |
255 return; | 255 return; |
256 } | 256 } |
257 | 257 |
258 scoped_refptr<ExtensionPermissionSet> permissions; | 258 scoped_refptr<PermissionSet> permissions; |
259 for (size_t i = 0; i < dummy_extensions_.size(); ++i) { | 259 for (size_t i = 0; i < dummy_extensions_.size(); ++i) { |
260 permissions = ExtensionPermissionSet::CreateUnion( | 260 permissions = PermissionSet::CreateUnion( |
261 permissions, dummy_extensions_[i]->required_permission_set()); | 261 permissions, dummy_extensions_[i]->required_permission_set()); |
262 } | 262 } |
263 | 263 |
264 if (g_auto_approve_for_test == PROCEED) { | 264 if (g_auto_approve_for_test == PROCEED) { |
265 InstallUIProceed(); | 265 InstallUIProceed(); |
266 } else if (g_auto_approve_for_test == ABORT) { | 266 } else if (g_auto_approve_for_test == ABORT) { |
267 InstallUIAbort(true); | 267 InstallUIAbort(true); |
268 } else { | 268 } else { |
269 Browser* browser = browser_; | 269 Browser* browser = browser_; |
270 if (!browser) { | 270 if (!browser) { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 void BundleInstaller::OnBrowserAdded(Browser* browser) {} | 340 void BundleInstaller::OnBrowserAdded(Browser* browser) {} |
341 | 341 |
342 void BundleInstaller::OnBrowserRemoved(Browser* browser) { | 342 void BundleInstaller::OnBrowserRemoved(Browser* browser) { |
343 if (browser_ == browser) | 343 if (browser_ == browser) |
344 browser_ = NULL; | 344 browser_ = NULL; |
345 } | 345 } |
346 | 346 |
347 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} | 347 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} |
348 | 348 |
349 } // namespace extensions | 349 } // namespace extensions |
OLD | NEW |